You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some gitbase-web examples look outdated, not using simplest syntax or not the most performance one. This needs a review by the gitbase devs to have optimal examples.
Example:
/* Commits per committer, each month of 2018, for each repository */
SELECT COUNT(*) as num_commits, month, repository_id, committer_name, committer_email
FROM ( SELECT MONTH(committer_when) as month,
r.repository_id,
committer_name,
committer_email
FROM ref_commits r
INNER JOIN commits c
ON YEAR(c.committer_when) = 2018 AND r.commit_hash = c.commit_hash
WHERE r.ref_name = 'HEAD'
) as t GROUP BY committer_email, committer_name, month, repository_id
Shouldn't that be a NATURAL JOIN? Shouldn't the YEAR condition be in WHERE?
The text was updated successfully, but these errors were encountered:
Some gitbase-web examples look outdated, not using simplest syntax or not the most performance one. This needs a review by the gitbase devs to have optimal examples.
Example:
Shouldn't that be a
NATURAL JOIN
? Shouldn't theYEAR
condition be inWHERE
?The text was updated successfully, but these errors were encountered: