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

本站现有博文327篇,共被浏览832968

本站已经建立2538天!

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