Skip to content

JoinOrder Q9a — American Voice Actress Movies

JoinOrder benchmark · all JoinOrder queries

American voice actress movies (8 tables)

Representative SQL

Rendered for DataFusion with default parameters.

SELECT
MIN(an.name) AS alternative_name,
MIN(chn.name) AS character_name,
MIN(t.title) AS movie
FROM aka_name AS an, char_name AS chn, cast_info AS ci, company_name AS cn, movie_companies AS mc, name AS n, role_type AS rt, title AS t
WHERE
ci.note IN (
'(voice)',
'(voice: Japanese version)',
'(voice) (uncredited)',
'(voice: English version)'
)
AND cn.country_code = '[us]'
AND mc.note IS NOT NULL
AND (
mc.note LIKE '%(USA)%' OR mc.note LIKE '%(worldwide)%'
)
AND n.gender = 'f'
AND n.name LIKE '%Ang%'
AND rt.role = 'actress'
AND t.production_year BETWEEN 2005 AND 2015
AND ci.movie_id = t.id
AND t.id = mc.movie_id
AND ci.movie_id = mc.movie_id
AND mc.company_id = cn.id
AND ci.role_id = rt.id
AND n.id = ci.person_id
AND chn.id = ci.person_role_id
AND an.person_id = n.id
AND an.person_id = ci.person_id

Representative DataFrame

Expression family (Polars, PySpark, DataFusion), default parameters.

def _impl(ctx: DataFrameContext) -> Any:
return _execute_joinorder_expression_query(ctx, query_id)

Get the exact query for your run

The blocks above are representative. To get the precise statement a specific platform runs at a specific scale, substitute your own values:

from benchbox import JoinOrder
bench = JoinOrder(scale_factor=1.0) # your scale factor
queries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQL
print(queries['9a'])

For the DataFrame form:

from benchbox.core.query_catalog import get_dataframe_render
print(get_dataframe_render('joinorder', '9a', family="expression").source) # or family="pandas"

Source

Query text: benchbox/core/joinorder/queries.py