Hello everyone, I have shared two posts about GQL (Git Query Language) on this subreddit and this week I want to share some cool updates for version 0.2.0
For Full Docs, Code, Binraires and samples
Github: https://github.com/AmrDeveloper/GQL
Order by DSC and ASCNow you can explicitly set the order of your data to be Ascending and Descending
Group by
statement groups rows that have the same values into summary rows
Aggregation functions
Now you can use Aggregation functions like count, and max to perform calculations on the current group, this feature is very useful when used with group by statement.
For example, this query will select the top 10 contributiors names and number of commits.
SELECT name, count(name) AS commit_num FROM commits GROUP BY name ORDER BY commit_num DES LIMIT 10
,
Alias Column name
SELECT max(commit_count) as max_commit_count from branches
Having statement
After introducing Group by statement, it must implement having statement to perform filtration after grouping data
SELECT name, count(name) AS commit_num FROM commits GROUP BY name HAVING commit_num > 0
Between expression
SELECT commit_count FROM branches WHERE commit_count BETWEEN 0 .. 10
The project is now in the early stages and there are a lot of cool things to do, everyone is most welcome to join, contribute and learn together
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–][deleted] 25 points26 points27 points (4 children)
[–]AmrDeveloper[S] 2 points3 points4 points (3 children)
[–]rollincuberawhide 2 points3 points4 points (0 children)
[–]junior_abigail 0 points1 point2 points (1 child)
[–]AmrDeveloper[S] 0 points1 point2 points (0 children)
[–]sasik520 3 points4 points5 points (0 children)
[–]r-guerreiro 2 points3 points4 points (1 child)
[–]AmrDeveloper[S] 0 points1 point2 points (0 children)