context
stringlengths
28
393
answer
stringlengths
17
532
question
stringlengths
5
112
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, birth_date VARCHAR)
SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1
最年轻的雇员的名字和姓是什么?
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR)
SELECT first_name, last_name FROM employees ORDER BY hire_date ASC LIMIT 10
列出10大在公司工作最长的时间的员工。列出员工的名字和姓氏。
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR)
SELECT first_name, last_name FROM employees ORDER BY hire_date ASC LIMIT 10
前10名任职时间最长的员工的名字和姓氏是什么?
CREATE TABLE employees (title VARCHAR, city VARCHAR)
SELECT COUNT(*), city FROM employees WHERE title = '运维职员' GROUP BY city
找到每个城市的头衔为IT员工的数目?
CREATE TABLE employees (title VARCHAR, city VARCHAR)
SELECT COUNT(*), city FROM employees WHERE title = '运维职员' GROUP BY city
每一个城市的IT员工有多少?
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, id VARCHAR)
SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY COUNT(T1.reports_to) DESC LIMIT 1
哪个员工管理最多的人?列出员工的姓名,以及报告该员工管理的人数。
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, id VARCHAR)
SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY COUNT(T1.reports_to) DESC LIMIT 1
所有员工的名字和姓氏是什么?有多少人向他们报告?
CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, id VARCHAR), CREATE TABLE invoices (customer_id VARCHAR)
SELECT COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "周" AND T1.last_name = "浩歌"
“周” “浩歌”有多少个订单?
CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, id VARCHAR), CREATE TABLE invoices (customer_id VARCHAR)
SELECT COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "周" AND T1.last_name = "浩歌"
“周” “浩歌”的发票有多少个订单?
CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, id VARCHAR), CREATE TABLE invoices (total INTEGER, customer_id VARCHAR)
SELECT SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "周" AND T1.last_name = "浩歌"
“周” “浩歌”花了多少钱?
CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, id VARCHAR), CREATE TABLE invoices (total INTEGER, customer_id VARCHAR)
SELECT SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "周" AND T1.last_name = "浩歌"
“周” “浩歌”花了多少钱?
CREATE TABLE media_types (name VARCHAR)
SELECT name FROM media_types
列出所有媒体类型。
CREATE TABLE media_types (name VARCHAR)
SELECT name FROM media_types
所有媒体类型的名称是什么?
CREATE TABLE genres (name VARCHAR)
SELECT DISTINCT name FROM genres
列出所有不同的体裁类型。
CREATE TABLE genres (name VARCHAR)
SELECT DISTINCT name FROM genres
有什么不同的体裁名字?
CREATE TABLE playlists (name VARCHAR)
SELECT name FROM playlists
列出所有播放列表的名称。
CREATE TABLE playlists (name VARCHAR)
SELECT name FROM playlists
所有播放列表的名字是什么?
CREATE TABLE tracks (name VARCHAR, composer VARCHAR)
SELECT composer FROM tracks WHERE name = "逆战"
谁是“逆战”的作曲家?
CREATE TABLE tracks (name VARCHAR, composer VARCHAR)
SELECT composer FROM tracks WHERE name = "逆战"
哪位作曲家创造了“逆战”曲子?
CREATE TABLE tracks (name VARCHAR, milliseconds VARCHAR)
SELECT milliseconds FROM tracks WHERE name = "逆战"
曲子“逆战”有多长?
CREATE TABLE tracks (name VARCHAR, milliseconds VARCHAR)
SELECT milliseconds FROM tracks WHERE name = "逆战"
“逆战”有多少毫秒长?
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR)
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "摇滚"
“摇滚”是什么类型的曲目的名字?
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR)
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "摇滚"
“摇滚”乐曲中所有曲目的名称是什么?
CREATE TABLE albums (title VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR)
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "奇幻旅程"
“奇幻旅程”这首歌所属的专辑是什么?
CREATE TABLE albums (title VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR)
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "奇幻旅程"
哪张专辑有名字为“奇幻旅程”这首歌?
CREATE TABLE albums (title VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR)
SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "奇幻旅程"
列出“奇幻旅程”中的歌曲名字。
CREATE TABLE albums (title VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR)
SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "奇幻旅程"
这张“奇幻旅程”专辑中的所有歌曲的名字是什么?
CREATE TABLE albums (title VARCHAR, id VARCHAR), CREATE TABLE tracks (album_id VARCHAR)
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING COUNT(T1.id) > 10
列出曲目数高于10的专辑标题。
CREATE TABLE albums (title VARCHAR, id VARCHAR), CREATE TABLE tracks (album_id VARCHAR)
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING COUNT(T1.id) > 10
有超过10首曲目的专辑名称是什么?
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR, media_type_id VARCHAR), CREATE TABLE media_types (name VARCHAR, id VARCHAR)
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "摇滚" AND T3.name = "MPEG"
列出属于“摇滚”类型的曲目名称,并且其媒体类型是MPEG音频文件。
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR, media_type_id VARCHAR), CREATE TABLE media_types (name VARCHAR, id VARCHAR)
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "摇滚" AND T3.name = "MPEG"
以MPEG音频格式存储的所有摇滚曲目的名称是什么?
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR, media_type_id VARCHAR), CREATE TABLE media_types (name VARCHAR, id VARCHAR)
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "摇滚" OR T3.name = "MPEG"
列出属于摇滚风格或媒体类型是MPEG音频文件的曲目名称。
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR, media_type_id VARCHAR), CREATE TABLE media_types (name VARCHAR, id VARCHAR)
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "摇滚" OR T3.name = "MPEG"
属于摇滚音乐并且其媒体类型是MPEG的所有曲目的名称是什么?
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR)
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "摇滚" OR T1.name = "爵士"
列出属于摇滚或爵士乐类型的曲目的名称。
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (name VARCHAR, genre_id VARCHAR)
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "摇滚" OR T1.name = "爵士"
摇滚乐或爵士乐歌曲的名字是什么?
CREATE TABLE tracks (name VARCHAR, id VARCHAR), CREATE TABLE playlist_tracks (track_id VARCHAR, playlist_id VARCHAR), CREATE TABLE playlists (name VARCHAR, id VARCHAR)
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "电影"
列出电影播放列表中所有曲目的名称。
CREATE TABLE tracks (name VARCHAR, id VARCHAR), CREATE TABLE playlist_tracks (track_id VARCHAR, playlist_id VARCHAR), CREATE TABLE playlists (name VARCHAR, id VARCHAR)
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "电影"
标题为电影的播放列表中所有曲目的名称是什么?
CREATE TABLE playlist_tracks (track_id VARCHAR, playlist_id VARCHAR), CREATE TABLE playlists (name VARCHAR, id VARCHAR)
SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING COUNT(T1.track_id) > 100
列出有大于100首曲目的播放列表的名称。
CREATE TABLE playlist_tracks (track_id VARCHAR, playlist_id VARCHAR), CREATE TABLE playlists (name VARCHAR, id VARCHAR)
SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING COUNT(T1.track_id) > 100
有超过100条曲目的所有播放列表的名称是什么?
CREATE TABLE tracks (name VARCHAR, id VARCHAR), CREATE TABLE invoice_lines (invoice_id VARCHAR, track_id VARCHAR), CREATE TABLE invoices (customer_id VARCHAR, id VARCHAR), CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, id VARCHAR)
SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "康" AND T4.last_name = "伯约"
列出客户'“康” “伯约”'购买的所有曲目。
CREATE TABLE tracks (name VARCHAR, id VARCHAR), CREATE TABLE invoice_lines (invoice_id VARCHAR, track_id VARCHAR), CREATE TABLE invoices (customer_id VARCHAR, id VARCHAR), CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, id VARCHAR)
SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "康" AND T4.last_name = "伯约"
“康” “伯约”'买的曲目是什么?
CREATE TABLE tracks (name VARCHAR, unit_price VARCHAR)
SELECT unit_price FROM tracks WHERE name = "逆战"
“逆战”要多少钱?
CREATE TABLE tracks (name VARCHAR, unit_price VARCHAR)
SELECT unit_price FROM tracks WHERE name = "逆战"
“逆战”的单价是多少?
CREATE TABLE tracks (name VARCHAR, id VARCHAR), CREATE TABLE playlist_tracks (track_id VARCHAR, playlist_id VARCHAR), CREATE TABLE playlists (name VARCHAR, id VARCHAR)
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = '电影' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = '音乐'
找到在电影播放列表中但不在音乐播放列表中的曲目名称。
CREATE TABLE tracks (name VARCHAR, id VARCHAR), CREATE TABLE playlist_tracks (track_id VARCHAR, playlist_id VARCHAR), CREATE TABLE playlists (name VARCHAR, id VARCHAR)
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = '电影' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = '音乐'
在电影播放列表中但不在音乐播放列表中的所有曲目名称是什么?
CREATE TABLE tracks (name VARCHAR, id VARCHAR), CREATE TABLE playlist_tracks (track_id VARCHAR, playlist_id VARCHAR), CREATE TABLE playlists (name VARCHAR, id VARCHAR)
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = '电影' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = '音乐'
找到同时在电影和音乐播放列表中的曲目名称。
CREATE TABLE tracks (name VARCHAR, id VARCHAR), CREATE TABLE playlist_tracks (track_id VARCHAR, playlist_id VARCHAR), CREATE TABLE playlists (name VARCHAR, id VARCHAR)
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = '电影' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = '音乐'
在电影和音乐播放列表中共同都有哪些曲目?
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (genre_id VARCHAR)
SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name
找出每种体裁中的曲目数量?
CREATE TABLE genres (name VARCHAR, id VARCHAR), CREATE TABLE tracks (genre_id VARCHAR)
SELECT COUNT(*), T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name
每种体裁有多少条曲目?
CREATE TABLE editor (Id VARCHAR)
SELECT COUNT(*) FROM editor
有多少编辑?
CREATE TABLE editor (Age VARCHAR, Name VARCHAR)
SELECT Name FROM editor ORDER BY Age ASC
按年龄升序排列给出编辑的名称。
CREATE TABLE editor (Age VARCHAR, Name VARCHAR)
SELECT Name, Age FROM editor
编辑的姓名和年龄是多少?
CREATE TABLE editor (Name VARCHAR, Age INTEGER)
SELECT Name FROM editor WHERE Age > 25
列出超过25岁的编辑的名字。
CREATE TABLE editor (Age VARCHAR, Name VARCHAR)
SELECT Name FROM editor WHERE Age = 24 OR Age = 25
显示24岁或25岁的编辑的名字。
CREATE TABLE editor (Age VARCHAR, Name VARCHAR)
SELECT Name FROM editor ORDER BY Age ASC LIMIT 1
最年轻的编辑的名字是什么?
CREATE TABLE editor (Age VARCHAR)
SELECT Age, COUNT(*) FROM editor GROUP BY Age
编辑有哪些不同的年龄?每一个年龄段有多少编辑。
CREATE TABLE editor (Age VARCHAR)
SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1
请显示编辑中最常见的年龄。
CREATE TABLE journal (Theme VARCHAR)
SELECT DISTINCT Theme FROM journal
展示期刊的不同主题。
CREATE TABLE journal_committee (Journal_ID VARCHAR, Editor_ID VARCHAR), CREATE TABLE editor (Name VARCHAR, Editor_ID VARCHAR), CREATE TABLE journal (Theme VARCHAR, Journal_ID VARCHAR)
SELECT T2.Name, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID
显示编辑的姓名和他们作为委员会服务的期刊的主题。
CREATE TABLE journal_committee (Journal_ID VARCHAR, Editor_ID VARCHAR), CREATE TABLE editor (Name VARCHAR, Editor_ID VARCHAR), CREATE TABLE journal (Theme VARCHAR, Journal_ID VARCHAR)
SELECT T2.Name, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID
对于每个期刊委员会,找出编辑名称和期刊主题。
CREATE TABLE journal_committee (Journal_ID VARCHAR, Editor_ID VARCHAR), CREATE TABLE editor (age VARCHAR, Name VARCHAR, Editor_ID VARCHAR), CREATE TABLE journal (Theme VARCHAR, Journal_ID VARCHAR)
SELECT T2.Name, T2.age, T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID ORDER BY T3.Theme ASC
按照主题的字母顺序递增排序,显示编辑的姓名和年龄以及他们作为委员会服务的期刊的主题。
CREATE TABLE journal_committee (Journal_ID VARCHAR, Editor_ID VARCHAR), CREATE TABLE editor (Name VARCHAR, Editor_ID VARCHAR), CREATE TABLE journal (Sales INTEGER, Journal_ID VARCHAR)
SELECT T2.Name FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000
列出销售量超过3000份的期刊的委员会的编辑的姓名。
CREATE TABLE editor (Name VARCHAR, editor_id VARCHAR, Editor_ID VARCHAR), CREATE TABLE journal_committee (Editor_ID VARCHAR)
SELECT T1.editor_id, T1.Name, COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.editor_id
显示每个编辑的ID、姓名以及他们所在的期刊委员会的数量。
CREATE TABLE editor (Name VARCHAR, Editor_ID VARCHAR), CREATE TABLE journal_committee (Editor_ID VARCHAR)
SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT(*) >= 2
显示参与至少两个期刊委员会的编辑的名字。
CREATE TABLE editor (editor_id VARCHAR, Name VARCHAR), CREATE TABLE journal_committee (editor_id VARCHAR, Name VARCHAR)
SELECT Name FROM editor WHERE NOT editor_id IN (SELECT editor_id FROM journal_committee)
列出不在任何期刊委员会上的编辑的名字。
CREATE TABLE journal (sales VARCHAR, theme VARCHAR, journal_ID VARCHAR, date VARCHAR), CREATE TABLE journal_committee (journal_ID VARCHAR)
SELECT date, theme, sales FROM journal EXCEPT SELECT T1.date, T1.theme, T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID
列出没有任何编辑在委员会任职的杂志的日期、主题和销售情况。
CREATE TABLE journal (journal_ID VARCHAR, sales INTEGER), CREATE TABLE journal_committee (journal_ID VARCHAR, work_type VARCHAR)
SELECT AVG(T1.sales) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = '照片'
有一个工作类型是“照片”的编辑所属的期刊的平均销量是多少?
CREATE TABLE Accounts (Id VARCHAR)
SELECT COUNT(*) FROM Accounts
我们有多少个账户?
CREATE TABLE Accounts (Id VARCHAR)
SELECT COUNT(*) FROM Accounts
计算帐号数量。
CREATE TABLE Accounts (customer_id VARCHAR, account_id VARCHAR, account_name VARCHAR)
SELECT account_id, customer_id, account_name FROM Accounts
显示ID,客户ID,所有帐户的名称。
CREATE TABLE Accounts (customer_id VARCHAR, account_id VARCHAR, account_name VARCHAR)
SELECT account_id, customer_id, account_name FROM Accounts
所有账户的账户ID、客户ID和账户名称是什么?
CREATE TABLE Accounts (other_account_details VARCHAR, account_name VARCHAR)
SELECT other_account_details FROM Accounts WHERE account_name = "338"
显示帐户名称有“338”的其他账户信息。
CREATE TABLE Accounts (other_account_details VARCHAR, account_name VARCHAR)
SELECT other_account_details FROM Accounts WHERE account_name = "338"
有没有这个叫“338”的账号的其他信息?
CREATE TABLE Accounts (customer_id VARCHAR, account_name VARCHAR), CREATE TABLE Customers (customer_last_name VARCHAR, customer_phone VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR)
SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "162"
帐户名“162”的客户的名字、姓氏和电话是什么?
CREATE TABLE Accounts (customer_id VARCHAR, account_name VARCHAR), CREATE TABLE Customers (customer_last_name VARCHAR, customer_phone VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR)
SELECT T2.customer_first_name, T2.customer_last_name, T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "162"
给出帐户名“162”的客户的全名和电话。
CREATE TABLE Accounts (customer_id VARCHAR), CREATE TABLE Customers (customer_last_name VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR)
SELECT COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "艺术" AND T2.customer_last_name = "王"
名字为“艺术”和姓“王”的客户有多少个账户?
CREATE TABLE Accounts (customer_id VARCHAR), CREATE TABLE Customers (customer_last_name VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR)
SELECT COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "艺术" AND T2.customer_last_name = "王"
返回具有名“艺术”和姓“王”的客户的帐户数。
CREATE TABLE Accounts (customer_id VARCHAR)
SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id
显示所有客户ID和每个客户的帐号。
CREATE TABLE Accounts (customer_id VARCHAR)
SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id
每个客户ID有多少个帐户?
CREATE TABLE Accounts (customer_id VARCHAR)
SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1
显示有最多个账户的客户ID和帐户数量。
CREATE TABLE Accounts (customer_id VARCHAR)
SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1
帐户最多的客户的客户ID是什么,这个人有多少个帐户?
CREATE TABLE Accounts (customer_id VARCHAR), CREATE TABLE Customers (customer_last_name VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR)
SELECT T2.customer_first_name, T2.customer_last_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) ASC LIMIT 1
账户最少的客户的名字、姓氏和ID是什么?
CREATE TABLE Accounts (customer_id VARCHAR), CREATE TABLE Customers (customer_last_name VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR)
SELECT T2.customer_first_name, T2.customer_last_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) ASC LIMIT 1
给出账户最少的客户的全名和客户ID。
CREATE TABLE Customers (customer_id VARCHAR), CREATE TABLE Accounts (customer_id VARCHAR)
SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)
显示没有账户的所有客户的数量。
CREATE TABLE Customers (customer_id VARCHAR), CREATE TABLE Accounts (customer_id VARCHAR)
SELECT COUNT(*) FROM Customers WHERE NOT customer_id IN (SELECT customer_id FROM Accounts)
有多少客户没有账户?
CREATE TABLE Customers (customer_last_name VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR), CREATE TABLE Accounts (customer_id VARCHAR)
SELECT customer_first_name, customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
显示没有任何帐户的客户的名字和姓氏。
CREATE TABLE Customers (customer_last_name VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR), CREATE TABLE Accounts (customer_id VARCHAR)
SELECT customer_first_name, customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
没有账户的客户的全名是什么?
CREATE TABLE Customers (customer_last_name VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR), CREATE TABLE Accounts (customer_id VARCHAR)
SELECT DISTINCT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
显示有账户的所有客户的不同的名字和姓氏。
CREATE TABLE Customers (customer_last_name VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR), CREATE TABLE Accounts (customer_id VARCHAR)
SELECT DISTINCT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
有账户的客户的全名是什么?
CREATE TABLE Accounts (customer_id VARCHAR)
SELECT COUNT(DISTINCT customer_id) FROM Accounts
有多少客户有账户?
CREATE TABLE Accounts (customer_id VARCHAR)
SELECT COUNT(DISTINCT customer_id) FROM Accounts
统计持有账户的客户数量。
CREATE TABLE Customers (Id VARCHAR)
SELECT COUNT(*) FROM Customers
我们有多少客户?
CREATE TABLE Customers (Id VARCHAR)
SELECT COUNT(*) FROM Customers
统计客户数量。
CREATE TABLE Customers (customer_last_name VARCHAR, customer_phone VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR)
SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers
显示所有客户的ID、名字、姓氏和电话。
CREATE TABLE Customers (customer_last_name VARCHAR, customer_phone VARCHAR, customer_first_name VARCHAR, customer_id VARCHAR)
SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers
每个客户的ID、全名和电话是什么?
CREATE TABLE Customers (customer_email VARCHAR, customer_last_name VARCHAR, customer_phone VARCHAR, customer_first_name VARCHAR)
SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = "许" AND customer_last_name = "海超"
名字是“许”姓氏是“海超”的客户的电话和电子邮箱是什么?
CREATE TABLE Customers (customer_email VARCHAR, customer_last_name VARCHAR, customer_phone VARCHAR, customer_first_name VARCHAR)
SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = "许" AND customer_last_name = "海超"
返回名字是“许”,姓氏是“海超”的客户的电话和电子邮件,。
CREATE TABLE Customers_cards (Id VARCHAR)
SELECT COUNT(*) FROM Customers_cards
显示客户卡的数量。
CREATE TABLE Customers_cards (Id VARCHAR)
SELECT COUNT(*) FROM Customers_cards
有多少客户卡?
CREATE TABLE Customers_cards (card_id VARCHAR, card_type_code VARCHAR, customer_id VARCHAR, card_number VARCHAR)
SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards
显示所有卡的ID、客户ID、卡类型代码、卡号。