Unverified Commit ca752b2d authored by Estelle Veisemburger's avatar Estelle Veisemburger Committed by Florent Chehab
Browse files

feat(stats): add default requests

parent 1f98822c
......@@ -42,6 +42,9 @@ function SqlRequestResult({ result }) {
>
Exporter en CSV
</Button>
<br></br>
<br></br>
Pour partager votre recherche il vous suffit de copier l'url de la page !
</div>
);
}
......@@ -52,6 +55,29 @@ const defaultRequest = `SELECT
FROM ?
ORDER BY x ASC;
`; //à changer selon le dataset
// si plusieurs requetes par défaut proposées pour un meme dataset : les proposer avec des boutons
/*
SELECT
date AS x,
major AS cat,
sum(nb_contributions) AS y
FROM ?
GROUP BY date, major
ORDER BY date ASC;
*/
/**
SELECT
date AS x,
CASE WHEN
major = 'IM' OR major = 'GM' OR major = 'GSM' THEN 'IM'
ELSE 'AUTRES'
END AS cat,
sum(nb_contributions) AS y
FROM ?
GROUP BY date, major
ORDER BY date ASC;
*/
function getRequestFromUrl() {
const getParamsInUrl = new URL(document.location).searchParams;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment