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

本站现有博文311篇,共被浏览742325

本站已经建立2382天!

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