Browse Source

Update sql.md

punctuations and typos.
content-update
Christopher Fremond 2 years ago committed by GitHub
parent
commit
f60122657b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      docs/db/sql.md

14
docs/db/sql.md

@ -20,7 +20,7 @@ AND u.id NOT IN (SELECT "userId" FROM public.progress p WHERE p."userId"=u.id);
### Toad ### Toad
The following query returns the users that are currently in the toad process. The information includes user and games info The following query returns the users that are currently in the toad process. The information includes user and games information.
```sql ```sql
-- query for **TOAD** -- query for **TOAD**
@ -55,7 +55,7 @@ ORDER BY r.attrs ->> 'score' ASC;
### Administration ### Administration
The following query returns the users currently in the administration process. All information about the user, the number of attempts and current phase. The following query returns the users currently in the administration process. This includes all information about the user, the number of attempts and current phase.
```sql ```sql
-- query for **administration** -- query for **administration**
@ -102,7 +102,7 @@ GROUP BY u.id, r.attrs;
### xp per user per activity ### xp per user per activity
The following query returns the amount of xp per user and per activity The following query returns the amount of xp per user and per activity.
```sql ```sql
WITH xp_user AS ( WITH xp_user AS (
@ -127,7 +127,7 @@ LEFT JOIN public.event e ON e.id=xu."eventParentId";
### user per xp ### user per xp
The following query returns the amount of xp per user The following query returns the amount of xp per user.
```sql ```sql
-- user per xp -- user per xp
@ -154,7 +154,7 @@ ORDER BY xp.amount DESC;
### group status ### group status
The following query returns the groups status per captain The following query returns the groups status per captain.
```sql ```sql
-- group status -- group status
@ -169,7 +169,7 @@ ORDER BY u."githubLogin" ASC;
### group progresses ### group progresses
The following query returns the progress per group The following query returns the progress per group.
```sql ```sql
-- group progresses -- group progresses
@ -195,4 +195,4 @@ FROM public.user u
LEFT JOIN progress_group pg ON "captainId"=u.id LEFT JOIN progress_group pg ON "captainId"=u.id
WHERE pg.path IS NOT NULL WHERE pg.path IS NOT NULL
ORDER BY u."githubLogin" ASC; ORDER BY u."githubLogin" ASC;
``` ```

Loading…
Cancel
Save