@@ -75,8 +75,8 @@ class App extends Component {
75
75
name : 'Files named main.go' ,
76
76
sql : `/* Files named main.go in HEAD */
77
77
SELECT t.repository_id, t.tree_entry_name,
78
- language (t.tree_entry_name, b.blob_content) AS lang, b.blob_content,
79
- uast (b.blob_content, language (t.tree_entry_name, b.blob_content))
78
+ LANGUAGE (t.tree_entry_name, b.blob_content) AS lang, b.blob_content,
79
+ UAST (b.blob_content, LANGUAGE (t.tree_entry_name, b.blob_content)) AS uast
80
80
FROM tree_entries AS t
81
81
JOIN blobs b ON tree_entries.blob_hash = blobs.blob_hash
82
82
JOIN commit_trees ON tree_entries.tree_hash = commit_trees.tree_hash
@@ -87,16 +87,16 @@ WHERE ref_name = 'HEAD'
87
87
{
88
88
name : 'Last commit for each repository' ,
89
89
sql : `/* Last commit for each repository */
90
- SELECT r.repository_id,commit_author_name,commit_author_when,commit_message
90
+ SELECT r.repository_id, commit_author_name, commit_author_when, commit_message
91
91
FROM refs r
92
92
natural JOIN commits
93
93
WHERE r.ref_name = 'HEAD' `
94
94
} ,
95
95
{
96
96
name : 'Top repositories by commits' ,
97
97
sql : `/* Top repositories by number of commits in HEAD */
98
- SELECT repository_id,commit_count
99
- FROM (SELECT r.repository_id,count (*) AS commit_count
98
+ SELECT repository_id, commit_count
99
+ FROM (SELECT r.repository_id, COUNT (*) AS commit_count
100
100
FROM refs r
101
101
JOIN ref_commits AS c ON r.ref_name = c.ref_name
102
102
WHERE r.ref_name = 'HEAD'
@@ -108,10 +108,10 @@ LIMIT 10 `
108
108
name : 'Top languages by repository count' ,
109
109
sql : `/* Top languages by repository count */
110
110
SELECT *
111
- FROM (SELECT language,Count (repository_id) AS repository_count
111
+ FROM (SELECT language, COUNT (repository_id) AS repository_count
112
112
FROM (SELECT DISTINCT
113
113
r.repository_id,
114
- language (t.tree_entry_name, b.blob_content) AS language
114
+ LANGUAGE (t.tree_entry_name, b.blob_content) AS language
115
115
FROM refs r
116
116
JOIN commits c ON r.commit_hash = c.commit_hash
117
117
JOIN commit_trees ct ON c.commit_hash = ct.commit_hash
@@ -123,7 +123,7 @@ ORDER BY repository_count DESC `
123
123
} ,
124
124
{
125
125
name : 'Number of commits per month' ,
126
- sql : `/* Contributor's number of commits , each month of 2018, for each repository */
126
+ sql : `/* Commits per committer , each month of 2018, for each repository */
127
127
SELECT COUNT(*) as num_commits, month, repository_id, committer_name, committer_email
128
128
FROM ( SELECT MONTH(committer_when) as month,
129
129
r.repository_id,
0 commit comments