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

本站现有博文339篇,共被浏览998393次

本站已经建立2709天!

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