des

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフロー

プログラマーとプログラミングに熱心な人々のための質問と回答

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