Query examples
These examples are drawn from the repository’s query-by-example corpus. Each domain assumes its corresponding model and database mappings. They are instructional examples, not live execution results.
Cinema bookings
Section titled “Cinema bookings”“What films are there?”
WHICH Film“What films are playing at the Great Western Cinema?”
WHICH Film is showing at (Cinema:'Great Western Cinema')“What dates does Peter have a booking for?”
WHICH DateTime has A Session THAT has A Booking THAT is for (Person:'Peter')“Show the login names of people who booked Rocky.”
WHICH Person made A Booking THAT is for A SessionTHAT is to watch (Film:'Rocky') RETURN Person.LoginName“How many seats are in the Great Western Cinema?”
WHICH Seat is in A Row in (Cinema:'Great Western Cinema') RETURN COUNT(*)Sales orders
Section titled “Sales orders”“Show total sales by customer city.”
WHICH Sales Order has WHICH Sold To Customer City AND WHICH Line TotalRETURN SalesOrder.SldToCustCity, SalesOrder.SlsLineTotal.SUMGROUP BY SalesOrder.SldToCustCity“Which orders have Flatscreen in the product name?”
WHICH Sales Order has (Mat Description~'%Flatscreen%') RETURN SalesOrder.SlsOrdNumExplore the source collections
Section titled “Explore the source collections”The raw training files are evolving and include inconsistencies. Check a query against its model and runtime before using it as an executable example or an evaluation target.