forked from lloydtabb/imdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tomhanks.malloynb
20 lines (20 loc) · 1 KB
/
tomhanks.malloynb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[
{
"kind": 1,
"language": "markdown",
"value": "# Tom Hanks explored",
"metadata": {}
},
{
"kind": 2,
"language": "malloy",
"value": "import \"imdb.malloy\"",
"metadata": {}
},
{
"kind": 2,
"language": "malloy",
"value": "query: tom_hanks_movies is movies->{\n where: principals.people.primaryName ~ r'Tom Hanks'\n group_by: tconst\n}\nquery: movies -> {\n join_one: x is from(-> tom_hanks_movies) with tconst\n where: x.tconst != null and startYear < 2010\n\n nest: tom_dashboard is {\n nest: works_with is by_name + {\n nest: by_role_list is by_job_category\n limit: 10\n order_by: 4 desc\n }\n nest: title_list_detail is {\n group_by: primaryTitle, startYear\n order_by: 2 desc\n }\n nest: by_genre_bar_chart is {\n where: startYear != null\n group_by: genres.value\n aggregate: title_count\n aggregate: avg_year is startYear.avg()\n }\n nest: titles_dashboard\n }\n}\n",
"metadata": {}
}
]