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

本站现有博文335篇,共被浏览937414

本站已经建立2648天!

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