EADST

Calculate the Ratio with CASE WHEN in SQL

Here is the SQL sentence to calculate the ratio with the case when.

SELECT sku, SUM(CASE WHEN sales_qty='None' THEN 1 END)*1.00/SUM(1)
FROM table
GROUP BY sku;

相关标签
SQL
About Me
XD
Goals determine what you are going to be.
Category
标签云
GGML DeepSeek Python Food SVR GoogLeNet 腾讯云 Excel SQL 音频 Translation 搞笑 Django Data Land VGG-16 Jupyter Hotel Use hf CV Google XGBoost 净利润 Tiktoken VSCode Disk 顶会 Markdown Proxy printf Bitcoin Ubuntu Shortcut Freesound Pytorch Safetensors mmap Git ONNX 公式 LLAMA torchinfo Distillation FlashAttention Sklearn Input 论文速读 报税 ModelScope Plotly 递归学习法 签证 InvalidArgumentError RAR GIT Color Agent PDB Zip Nginx XML CEIR Tensor EXCEL VPN diffusers YOLO CUDA 图标 Image2Text IndexTTS2 PIP Pandas OCR PyCharm scipy CTC Qwen Permission API Streamlit Qwen2 Cloudreve 图形思考法 Claude 财报 GPTQ 继承 JSON RGB v2ray Search BTC BF16 ms-swift LLM HuggingFace Miniforge ChatGPT Crawler Domain FP64 PyTorch Statistics SQLite Pickle Math HaggingFace C++ OpenCV TSV NameSilo RL Anaconda Template tqdm Rebuttal llama.cpp NLP Dataset Algorithm Clash OpenAI Qwen2.5 Augmentation Hungarian SPIE AI PDF Paper Quantize tar Gemma UI FastAPI ResNet-50 Attention Windows Conda Interview 多进程 Ptyhon 第一性原理 Base64 FP8 Magnet Pillow Vmess GPT4 Firewall News Animate Password 云服务器 UNIX uwsgi Bipartite CSV LeetCode LaTeX COCO Vim 飞书 CAM v0.dev Logo Plate Knowledge 论文 FP32 FP16 关于博主 Llama WAN git-lfs TensorFlow Heatmap git Video transformers Jetson uWSGI 阿里云 SAM Baidu 证件照 Random Paddle LoRA 算法题 Docker Bin Mixtral TensorRT Review QWEN Datetime Hilton Quantization 多线程 CLAP NLTK Tracking DeepStream Numpy MD5 CC Bert TTS Breakpoint icon Github 域名 Website Michelin Linux Transformers 版权 WebCrawler logger 强化学习 Diagram BeautifulSoup Card Web
站点统计

本站现有博文332篇,共被浏览896630

本站已经建立2597天!

热门文章
文章归档
回到顶部