AI SQL Examples
We run automated tests to ensure that the generated SQL queries and statements are best-in-class and don't regress.
Results from Thu, 23 Mar 2023 12:31:35 GMT (total tokens: 8675)
actor's first name and last name that have Nick, Ed and Jennifer as their first names
Usage: 452 tokens (prompt: 422, completion: 30). Database engine: mysql.
all the details of the address
Usage: 416 tokens (prompt: 410, completion: 6). Database engine: mysql.
all the details of the address (take 10)
Usage: 422 tokens (prompt: 413, completion: 9). Database engine: mysql.
how many movies are rented out
Usage: 431 tokens (prompt: 410, completion: 21). Database engine: mysql.
get all movies that are in inventory and are not rented out
Usage: 460 tokens (prompt: 416, completion: 44). Database engine: mysql.
how much money did we make in total
Usage: 426 tokens (prompt: 412, completion: 14). Database engine: mysql.
what is the highest and lowest movie rental price
Usage: 434 tokens (prompt: 413, completion: 21). Database engine: mysql.
what is the average movie rental price
Usage: 427 tokens (prompt: 411, completion: 16). Database engine: mysql.
movies rented per month
Usage: 465 tokens (prompt: 409, completion: 56). Database engine: mysql.
show me all movies and categorize each by length: Short, Medium, Long and Very Long
Usage: 512 tokens (prompt: 423, completion: 89). Database engine: mysql.
extract first name from customer emails by using dot
Usage: 455 tokens (prompt: 414, completion: 41). Database engine: mysql.
get all staff members with name, address, phone, zip code, city, country and store id
Usage: 544 tokens (prompt: 424, completion: 120). Database engine: mysql.
get stores with total sales revenue, staff manager's name, and location city
Usage: 563 tokens (prompt: 419, completion: 144). Database engine: mysql.
find customers who didn't rent a movie in the last 12 months but rented a movie in the 12 months before that
Usage: 529 tokens (prompt: 427, completion: 102). Database engine: mysql.
create table movies with id, title, description, release year, language_id, rental_duration, rental rate, length, replacement cost, rating, special features, last update
Usage: 587 tokens (prompt: 440, completion: 147). Database engine: mysql.
update all actors starting with a vowel to also start their last name with that vowel
Usage: 506 tokens (prompt: 420, completion: 86). Database engine: mysql.
add a column called "active" to the actor table
Usage: 437 tokens (prompt: 415, completion: 22). Database engine: mysql.
create new film with title "The Matrix", description "A computer hacker learns from mysterious rebels about the true nature of his reality and his role in the war against its controllers.", release year 1999, language_id 1, rental_duration 6, rental rate 0.99, length 136, replacement cost 19.99, rating "R", special features "Trailers,Commentaries", last update "2006-02-15 09:34:33"
Usage: 609 tokens (prompt: 494, completion: 115). Database engine: mysql.