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

本站现有博文324篇,共被浏览808731

本站已经建立2511天!

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