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

本站现有博文333篇,共被浏览914497

本站已经建立2617天!

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