Table:
0
A
B
C
D
E
F
G
1
document id
document type code
grant id
sent date
response received date
other details
2
1
APP
5
1986-11-30 07:56:35
1977-12-01 02:18:53
3
2
APP
13
2004-01-23 11:57:08
1979-12-08 10:38:07
4
3
REG
10
1999-03-03 12:25:58
1995-09-12 13:13:48
5
4
APP
13
1999-05-29 00:02:46
1991-09-25 10:38:24
6
5
APP
11
2003-08-29 03:32:52
1986-05-23 07:17:59
7
6
REG
5
1979-07-04 08:54:23
1976-10-04 22:13:27
8
7
APP
13
1978-09-13 16:23:29
1979-01-06 05:05:30
9
8
APP
15
2001-06-18 06:35:49
1986-05-18 01:54:56
10
9
APP
6
2014-01-28 05:11:34
1980-02-24 15:23:44
11
10
REG
7
2002-07-26 15:50:28
1987-10-29 15:35:50
12
11
REG
15
1993-02-19 16:31:12
1994-03-13 01:52:45
13
12
REG
13
1997-03-09 03:42:19
1977-01-27 07:14:11
14
13
APP
13
1979-08-23 08:22:34
1990-01-19 19:57:14
15
14
APP
15
2000-06-06 01:03:46
1971-08-28 11:20:56
16
15
APP
8
1981-08-06 14:56:55
1999-06-01 18:41:00

Questions and formulas:
Question: For each grant id, how many documents does it have, and which one has the most?
Formula: TAKE(SORT(SUMMARIZE(C1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C16,SUMX(A2:A16)), 2, -1), 1)
Level: hard