"pull a column from a select function and add it on an existing select query" Code Answer

40

This is a way to do it :

SELECT COUNT (product_category) as count_categories, COUNT (case when is_click=true then 1 end) as count_click
FROM marketingimpression 
GROUP BY product_category

DISTINCT is not needed since you will get one count per product_category

By random_coder_101 on May 26 2023

Answers related to “pull a column from a select function and add it on an existing select query”

Only authorized users can answer the search term. Please sign in first, or register a free account.