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

本站现有博文340篇,共被浏览1017815次

本站已经建立2718天!

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