des

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Different

Q&A for power users of Apple hardware and software

WITH temp as (
SELECT 'A' as master , 1 Col 
UNION SELECT 'A' , 3  
UNION SELECT 'B' , 1 
UNION SELECT 'B' , 2 
UNION SELECT 'C' , 1 
UNION SELECT NULL , 1 
UNION SELECT NULL , 2 )
SELECT
   master,
   count(Col) over (partition by master)
FROM
  temp

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results