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

本站现有博文341篇,共被浏览1050416次

本站已经建立2730天!

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