P-Karthik-Mohan commited on
Commit
935b3b5
·
1 Parent(s): 7b19898

Final submission ;)

Browse files
Files changed (1) hide show
  1. results.json +12 -4
results.json CHANGED
@@ -2,6 +2,7 @@
2
  "results": [
3
  {
4
  "task_id": 1,
 
5
  "difficulty": "easy",
6
  "best_reward": 1.0,
7
  "attempts": 1,
@@ -10,6 +11,7 @@
10
  },
11
  {
12
  "task_id": 2,
 
13
  "difficulty": "medium",
14
  "best_reward": 1.0,
15
  "attempts": 1,
@@ -18,6 +20,7 @@
18
  },
19
  {
20
  "task_id": 3,
 
21
  "difficulty": "hard",
22
  "best_reward": 1.0,
23
  "attempts": 1,
@@ -26,6 +29,7 @@
26
  },
27
  {
28
  "task_id": 4,
 
29
  "difficulty": "medium",
30
  "best_reward": 1.0,
31
  "attempts": 1,
@@ -34,6 +38,7 @@
34
  },
35
  {
36
  "task_id": 5,
 
37
  "difficulty": "hard",
38
  "best_reward": 1.0,
39
  "attempts": 1,
@@ -42,14 +47,16 @@
42
  },
43
  {
44
  "task_id": 6,
 
45
  "difficulty": "expert",
46
  "best_reward": 0.9,
47
  "attempts": 5,
48
- "final_sql": "SELECT \n STRFTIME('%Y-%m', order_date) AS month,\n SUM(total_amount) AS total_revenue,\n LAG(SUM(total_amount)) OVER (ORDER BY STRFTIME('%Y-%m', order_date)) AS prev_revenue,\n ROUND(COALESCE((SUM(total_amount) - LAG(SUM(total_amount)) OVER (ORDER BY STRFTIME('%Y-%m', order_date))) / \n NULLIF(LAG(SUM(total_amount)) OVER (ORDER BY STRFTIME('%Y-%m', order_date)), 0) * 100, NULL), 2) AS growth_pct\nFROM orders\nWHERE STRFTIME('%Y', order_date) = '2024' AND status = 'completed'\nGROUP BY STRFTIME('%Y-%m', order_date)\nORDER BY STRFTIME('%Y-%m', order_date)",
49
  "solved": false
50
  },
51
  {
52
  "task_id": 7,
 
53
  "difficulty": "expert",
54
  "best_reward": 1.0,
55
  "attempts": 1,
@@ -58,13 +65,14 @@
58
  },
59
  {
60
  "task_id": 8,
 
61
  "difficulty": "expert",
62
- "best_reward": 0.98,
63
  "attempts": 5,
64
- "final_sql": "SELECT \n c.customer_id, \n c.first_name, \n c.last_name, \n SUM(CASE WHEN STRFTIME('%Y', o.order_date) = 2024 AND STRFTIME('%m', o.order_date) BETWEEN '01' AND '06' THEN o.total_amount ELSE 0 END) AS h1_revenue,\n SUM(CASE WHEN STRFTIME('%Y', o.order_date) = 2024 AND STRFTIME('%m', o.order_date) BETWEEN '07' AND '12' THEN o.total_amount ELSE 0 END) AS h2_revenue\nFROM \n customers c\n JOIN orders o ON c.customer_id = o.customer_id\nWHERE \n o.status = 'completed'\nGROUP BY \n c.customer_id, c.first_name, c.last_name\nHAVING \n h2_revenue > h1_revenue\nORDER BY \n h2_revenue DESC",
65
  "solved": false
66
  }
67
  ],
68
- "avg_score": 0.985,
69
  "tasks_solved": 6
70
  }
 
2
  "results": [
3
  {
4
  "task_id": 1,
5
+ "task_name": "sql-task-1",
6
  "difficulty": "easy",
7
  "best_reward": 1.0,
8
  "attempts": 1,
 
11
  },
12
  {
13
  "task_id": 2,
14
+ "task_name": "sql-task-2",
15
  "difficulty": "medium",
16
  "best_reward": 1.0,
17
  "attempts": 1,
 
20
  },
21
  {
22
  "task_id": 3,
23
+ "task_name": "sql-task-3",
24
  "difficulty": "hard",
25
  "best_reward": 1.0,
26
  "attempts": 1,
 
29
  },
30
  {
31
  "task_id": 4,
32
+ "task_name": "sql-task-4",
33
  "difficulty": "medium",
34
  "best_reward": 1.0,
35
  "attempts": 1,
 
38
  },
39
  {
40
  "task_id": 5,
41
+ "task_name": "sql-task-5",
42
  "difficulty": "hard",
43
  "best_reward": 1.0,
44
  "attempts": 1,
 
47
  },
48
  {
49
  "task_id": 6,
50
+ "task_name": "sql-task-6",
51
  "difficulty": "expert",
52
  "best_reward": 0.9,
53
  "attempts": 5,
54
+ "final_sql": "SELECT \n STRFTIME('%Y-%m', order_date) AS month,\n SUM(total_amount) AS total_revenue,\n LAG(SUM(total_amount)) OVER (ORDER BY STRFTIME('%Y-%m', order_date)) AS prev_revenue,\n ROUND(COALESCE((SUM(total_amount) - LAG(SUM(total_amount)) OVER (ORDER BY STRFTIME('%Y-%m', order_date))) / \n LAG(SUM(total_amount)) OVER (ORDER BY STRFTIME('%Y-%m', order_date)), 0) * 100, 2) AS growth_pct\nFROM orders\nWHERE STRFTIME('%Y', order_date) = '2024' AND status = 'completed'\nGROUP BY STRFTIME('%Y-%m', order_date)\nORDER BY STRFTIME('%Y-%m', order_date)",
55
  "solved": false
56
  },
57
  {
58
  "task_id": 7,
59
+ "task_name": "sql-task-7",
60
  "difficulty": "expert",
61
  "best_reward": 1.0,
62
  "attempts": 1,
 
65
  },
66
  {
67
  "task_id": 8,
68
+ "task_name": "sql-task-8",
69
  "difficulty": "expert",
70
+ "best_reward": 0.949,
71
  "attempts": 5,
72
+ "final_sql": "SELECT \n c.customer_id, \n c.first_name, \n c.last_name, \n SUM(CASE WHEN STRFTIME('%Y', o.order_date) = '2024' AND STRFTIME('%m', o.order_date) BETWEEN '01' AND '06' THEN o.total_amount ELSE 0 END) AS h1_revenue,\n SUM(CASE WHEN STRFTIME('%Y', o.order_date) = '2024' AND STRFTIME('%m', o.order_date) BETWEEN '07' AND '12' THEN o.total_amount ELSE 0 END) AS h2_revenue\nFROM \n customers c\n JOIN orders o ON c.customer_id = o.customer_id\nWHERE \n o.status = 'completed'\nGROUP BY \n c.customer_id, c.first_name, c.last_name\nHAVING \n h2_revenue > h1_revenue\nORDER BY \n h2_revenue DESC",
73
  "solved": false
74
  }
75
  ],
76
+ "avg_score": 0.981,
77
  "tasks_solved": 6
78
  }