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

本站现有博文333篇,共被浏览921902

本站已经建立2628天!

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