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

本站现有博文320篇,共被浏览759180

本站已经建立2427天!

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