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

本站现有博文332篇,共被浏览875141

本站已经建立2583天!

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