Please help me with the following
Question:
+------+----------+ | Name | Sub-name | +------+----------+ | A | x | | A | x | | B | x | | A | y | | B | y | +------+----------+
Desired Result:
+------+----------+-------+ | Name | Sub-name | Count | +------+----------+-------+ | A | x | 2 | | A | x | 2 | | B | x | 1 | | A | y | 1 | | B | y | 1 | +------+----------+-------+
Three columns Name, Subname, Count
I want to partition based on both name and subname.
count() over ()
, but the partition specification looks a bit off.