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

本站现有博文328篇,共被浏览850616

本站已经建立2557天!

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