-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example queries utilizing timestamps info #8
- Loading branch information
Showing
18 changed files
with
354 additions
and
180 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
...xample_queries/queries/average_words_per_minute_of_fastest_speaker_depending_on_time.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"target_databases":["databaseCS"], | ||
"description":"Evolution of speaking pace of the fastest speaker over time of the day.", | ||
"steps":[ | ||
{ | ||
"goal":"get_fastest_speaker", | ||
"aggregation": { | ||
"group_by":["speech.person_id"], | ||
"order_by":[ | ||
{ | ||
"column":"AVG((speech.token_count / (speech.total_duration / 60000)))", | ||
"direction":"DESC" | ||
} | ||
] | ||
}, | ||
"filtering": { | ||
"columns":["speech.person_id"], | ||
"conditions":[ | ||
{ | ||
"column":"speech.total_duration", | ||
"operator":">=", | ||
"value":"60000" | ||
} | ||
], | ||
"limit":"1" | ||
} | ||
}, | ||
{ | ||
"goal":"main", | ||
"aggregation": { | ||
"group_by":["speech.person_id", "speech.earliest_timestamp"], | ||
"order_by":[ | ||
{ | ||
"column":"speech.earliest_timestamp", | ||
"direction":"ASC" | ||
} | ||
] | ||
}, | ||
"filtering": { | ||
"columns":["speech.earliest_timestamp", "AVG((speech.token_count / (speech.total_duration / 60000))) AS average_wpm"], | ||
"conditions": [ | ||
{ | ||
"column":"speech.total_duration", | ||
"operator":">=", | ||
"value":"60000" | ||
}, | ||
{ | ||
"column":"speech.person_id", | ||
"operator":"=", | ||
"value":"step_result.get_fastest_speaker.speech.person_id" | ||
} | ||
], | ||
"limit":"" | ||
} | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
api/example_queries/queries/fastest_speaking_speakers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"target_databases":["databaseCS"], | ||
"description":" TOP 10 speakers with most words per minute.", | ||
"steps":[ | ||
{ | ||
"goal":"main", | ||
"aggregation": { | ||
"group_by":["speech.person_id"], | ||
"order_by":[ | ||
{ | ||
"column":"average_wpm", | ||
"direction":"desc" | ||
} | ||
] | ||
}, | ||
"filtering":{ | ||
"columns":["speech.person_id", "AVG((speech.token_count / (speech.total_duration / 60000))) AS average_wpm"], | ||
"conditions":[ | ||
{ | ||
"column":"speech.total_duration", | ||
"operator":">=", | ||
"value":"60000" | ||
} | ||
], | ||
"limit":"10" | ||
} | ||
} | ||
] | ||
} |
57 changes: 57 additions & 0 deletions
57
api/example_queries/queries/total_duration_of_speeches_given_by_ANO_members_ms.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"target_databases":["databaseCS"], | ||
"description":"Total duration of members of ANO in miliseconds", | ||
"steps": [ | ||
{ | ||
"goal":"get_ano_members", | ||
"aggregation" : { | ||
"group_by":["person.person_id", "organisation.organisation_id"], | ||
"order_by":[] | ||
}, | ||
"filtering": { | ||
"columns":["person.person_id"], | ||
"conditions": [ | ||
{ | ||
"column":"organisation.organisation_id", | ||
"operator":"LIKE", | ||
"value":"'%%ANO%%'" | ||
} | ||
], | ||
"limit":"" | ||
} | ||
}, | ||
{ | ||
"goal":"main", | ||
"aggregation": { | ||
"group_by":["affiliation.person_id"], | ||
"order_by":[ | ||
{ | ||
"column":"total_duration_ms", | ||
"direction":"DESC" | ||
} | ||
] | ||
}, | ||
"filtering": { | ||
"columns":["affiliation.person_id", "SUM(speech.total_duration) AS total_duration_ms"], | ||
"conditions": [ | ||
{ | ||
"column":"affiliation.person_id", | ||
"operator":"IN", | ||
"value":"step_result.get_ano_members.affiliation.person_id" | ||
}, | ||
{ | ||
"column":"speech.date", | ||
"operator":"<=", | ||
"value":"affiliation.until" | ||
}, | ||
{ | ||
"column":"speech.date", | ||
"operator":">=", | ||
"value":"affiliation.until" | ||
} | ||
], | ||
"limit":"" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 6 additions & 13 deletions
19
api/example_queries/results/average_sentences_most_talkative_result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
[{'affiliation.role': 'deputyHead', 'average_sentence_count': 6.296012975911273}, {'affiliation.role': 'member', 'average_sentence_count': 6.277422307657101}, {'affiliation.role': 'representative', 'average_sentence_count': 6.305979337294578}, {'affiliation.role': 'verifier', 'average_sentence_count': 6.327535906642729}, {'affiliation.role': 'head', 'average_sentence_count': 6.295505125733812}] | ||
[{'affiliation.role': 'deputyHead', 'average_sentence_count': 6.246553140472014}, {'affiliation.role': 'member', 'average_sentence_count': 6.239004233762873}, {'affiliation.role': 'representative', 'average_sentence_count': 6.265916590036242}, {'affiliation.role': 'verifier', 'average_sentence_count': 6.243060334939206}, {'affiliation.role': 'head', 'average_sentence_count': 6.244799432019879}] | ||
|
||
+------------------+------------------------+ | ||
| affiliation.role | average_sentence_count | | ||
+------------------+------------------------+ | ||
| deputyHead | 6.296012975911273 | | ||
| member | 6.277422307657101 | | ||
| representative | 6.305979337294578 | | ||
| verifier | 6.327535906642729 | | ||
| head | 6.295505125733812 | | ||
+------------------+------------------------+ | ||
[{'affiliation.role': 'member', 'average_sentence_count': 3.258727368606082}] | ||
|
||
+------------------+------------------------+ | ||
| affiliation.role | average_sentence_count | | ||
+------------------+------------------------+ | ||
| member | 3.258727368606082 | | ||
| deputyHead | 6.246553140472014 | | ||
| member | 6.239004233762873 | | ||
| representative | 6.265916590036242 | | ||
| verifier | 6.243060334939206 | | ||
| head | 6.244799432019879 | | ||
+------------------+------------------------+ |
17 changes: 4 additions & 13 deletions
17
api/example_queries/results/average_tokens_by_position_result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
[{'average_tokens': 18.241933321143414, 'speech.role': 'chair'}, {'average_tokens': 239.03225806451613, 'speech.role': 'guest'}, {'average_tokens': 91.23050163147671, 'speech.role': 'regular'}] | ||
[{'average_tokens': 447.41302235179785, 'speech.role': 'guest'}, {'average_tokens': 262.9682086742366, 'speech.role': 'regular'}, {'average_tokens': 54.36446967652388, 'speech.role': 'chair'}] | ||
|
||
+--------------------+-------------+ | ||
| average_tokens | speech.role | | ||
+--------------------+-------------+ | ||
| 18.241933321143414 | chair | | ||
| 239.03225806451613 | guest | | ||
| 91.23050163147671 | regular | | ||
| 447.41302235179785 | guest | | ||
| 262.9682086742366 | regular | | ||
| 54.36446967652388 | chair | | ||
+--------------------+-------------+ | ||
[{'average_tokens': 452.1521328803322, 'speech.role': 'guest'}, {'average_tokens': 266.9352142475181, 'speech.role': 'regular'}, {'average_tokens': 55.23546464501979, 'speech.role': 'chair'}] | ||
|
||
+-------------------+-------------+ | ||
| average_tokens | speech.role | | ||
+-------------------+-------------+ | ||
| 452.1521328803322 | guest | | ||
| 266.9352142475181 | regular | | ||
| 55.23546464501979 | chair | | ||
+-------------------+-------------+ |
Oops, something went wrong.