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

本站现有博文338篇,共被浏览976424次

本站已经建立2689天!

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