aherntech/sparc huggingface dataset:
Database: swimming
Question sequence:
How many swimming records are there in the system?
What about that in terms of swimmer ids?
Show me the one with the most of them.
Give me that swimmer's name.
SQL query sequence:
SELECT count(*) FROM record
SELECT swimmer_id, count(*) FROM record GROUP BY swimmer_id
SELECT swimmer_id FROM record GROUP BY swimmer_id ORDER BY count(*) DESC LIMIT 1
SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY count(*) DESC LIMIT 1
Final question: Find the name of the swimmer who has the most records.
Final SQL: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY count(*) DESC LIMIT 1
Database: swimming
Question sequence:
How many swimming records are there in the system?
What about that in terms of swimmer ids?
Show me those with at least two.
What about their names?
SQL query sequence:
SELECT count(*) FROM record
SELECT swimmer_id, count(*) FROM record GROUP BY swimmer_id
SELECT swimmer_id FROM record GROUP BY swimmer_id HAVING count(*) >= 2
SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id GROUP BY t2.swimmer_id HAVING count(*)  >=  2
Final question: Find the name of the swimmer who has at least 2 records.
Final SQL: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id GROUP BY t2.swimmer_id HAVING count(*)  >=  2
Database: swimming
Question sequence:
How many swimming records are there in the system?
What about swimming records of a result Win?
What about in terms of swimmer ids?
Show me those with more than one.
Show me their names and nationalities.
SQL query sequence:
SELECT count(*) FROM record
SELECT count(*) FROM record WHERE result = 'Win'
SELECT swimmer_id, count(*) FROM record WHERE result = 'Win' GROUP BY swimmer_id
SELECT swimmer_id FROM record WHERE result = 'Win' GROUP BY swimmer_id HAVING count(*) > 1
SELECT t1.name ,  t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win' GROUP BY t2.swimmer_id HAVING count(*)  >  1
Final question: Find the name and nationality of the swimmer who has won (i.e., has a result of "win") more than 1 time.
Final SQL: SELECT t1.name ,  t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win' GROUP BY t2.swimmer_id HAVING count(*)  >  1
Database: swimming
Question sequence:
How many swimming records are there?
Show me the swimmer ids associated with any of those record.
What about the swimmer ids that are not one of those?
Show me those swimmers' names.
SQL query sequence:
SELECT count(*) FROM record
SELECT distinct swimmer_id FROM record
SELECT id FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)
SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)
Final question: Find the names of the swimmers who have no record.
Final SQL: SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)
Database: swimming
Question sequence:
How many swimming records are there?
What about records that have results "Win"?
Show me the name of the swimmers who have any of those records.
Among those swimmers, who also have any records with results "Loss"?
SQL query sequence:
SELECT count(*) FROM record
SELECT count(*) FROM record where RESULT = 'Win'
SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win'
SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Loss'
Final question: Find the names of the swimmers who have both "win" and "loss" results in the record.
Final SQL: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Loss'
Database: swimming
Question sequence:
How many stadiums are there?
How many Australian swimmers are there in the record?
Show me the stadiums any of those swimmers have been to.
SQL query sequence:
SELECT count(*) FROM stadium
SELECT count(*) FROM Swimmer where nationality = 'Australian'
SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id JOIN event AS t3 ON t2.event_id  =  t3.id JOIN stadium AS t4 ON t4.id  =  t3.stadium_id WHERE t1.nationality  =  'Australia'
Final question: Find the names of stadiums that some Australian swimmers have been to.
Final SQL: SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id JOIN event AS t3 ON t2.event_id  =  t3.id JOIN stadium AS t4 ON t4.id  =  t3.stadium_id WHERE t1.nationality  =  'Australia'
Database: manufacturer
Question sequence:
What is the average market rate for furniture?
Show each furniture id number and its corresponding market_rate.
Which one has the lowest market_rate?
Which one has the highest?
Also show its name.
SQL query sequence:
SELECT avg(market_rate) FROM furniture
SELECT furniture_id, market_rate FROM furniture
SELECT furniture_id, market_rate FROM furniture ORDER BY market_rate LIMIT 1
SELECT furniture_id, market_rate FROM furniture ORDER BY market_rate DESC LIMIT 1
SELECT name ,  furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1
Final question: Return the name and id of the furniture with the highest market rate.
Final SQL: SELECT name ,  furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1
Database: manufacturer
Question sequence:
What are the names of the 5 furniture items with the highest market rates?
How about the top 2?
What are their market rates?
How about the sum?
SQL query sequence:
SELECT name FROM furniture ORDER BY market_rate DESC LIMIT 5
SELECT name FROM furniture ORDER BY market_rate DESC LIMIT 2
SELECT name, market_rate FROM furniture ORDER BY market_rate DESC LIMIT 2
SELECT sum(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2
Final question: Find the total market rate of the furnitures that have the top 2 market shares.
Final SQL: SELECT sum(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2
Database: manufacturer
Question sequence:
Show all information for the lowest market-rate furniture item.
What is its id number?
How many components does it have?
Also show its name.
SQL query sequence:
SELECT * FROM furniture ORDER BY market_rate LIMIT 1
SELECT furniture_id FROM furniture ORDER BY market_rate LIMIT 1
SELECT Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1
SELECT name ,  Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1
Final question: Find the name and component amount of the least popular furniture.
Final SQL: SELECT name ,  Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1
Database: manufacturer
Question sequence:
What is the highest dollar price among the furniture?
Show manufacture information for items with a lower price than this.
Show only their furniture_id numbers.
What are the names of these items?
SQL query sequence:
SELECT max(Price_in_Dollar) FROM furniture_manufacte
SELECT * FROM furniture_manufacte WHERE Price_in_Dollar < (SELECT max(Price_in_Dollar) FROM furniture_manufacte)
SELECT furniture_id FROM furniture_manufacte WHERE Price_in_Dollar < (SELECT max(Price_in_Dollar) FROM furniture_manufacte)
SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID WHERE t2.Price_in_Dollar  <  (SELECT max(Price_in_Dollar) FROM furniture_manufacte)
Final question: Find the names of furnitures whose prices are lower than the highest price.
Final SQL: SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID WHERE t2.Price_in_Dollar  <  (SELECT max(Price_in_Dollar) FROM furniture_manufacte)
Database: manufacturer
Question sequence:
What is the average number of shops for manufacturers?
How about the minimum?
Which manufacturer has the fewest shops?
Only show the year it opened and the name of the manufacturer.
SQL query sequence:
SELECT avg(Num_of_Shops) FROM manufacturer
SELECT min(Num_of_Shops) FROM manufacturer
SELECT * FROM manufacturer ORDER BY Num_of_Shops DESC LIMIT 1
SELECT open_year ,  name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1
Final question: Which manufacturer has the most number of shops? List its name and year of opening.
Final SQL: SELECT open_year ,  name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1
Database: manufacturer
Question sequence:
How many different manufacturers are there?
How many of them have fewer than 10 factories?
Show their names and the years they opened.
Also include those that have more than 10 shops.
SQL query sequence:
SELECT count(*) FROM manufacturer
SELECT count(*) FROM manufacturer WHERE num_of_shops < 10
SELECT name, open_year FROM manufacturer WHERE num_of_shops < 10
SELECT name, open_year FROM manufacturer WHERE num_of_shops < 10 OR num_of_shops > 10
Final question: Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.
Final SQL: SELECT name ,  open_year FROM manufacturer WHERE num_of_shops  >  10 OR Num_of_Factories  <  10
Database: manufacturer
Question sequence:
Show information for manufacturers that opened on or after 1990.
How about before 1990?
What is the maximim number of shops among these manufacturers?
Also show the average number of factories for this group.
SQL query sequence:
SELECT * FROM manufacturer WHERE open_year >= 1990
SELECT * FROM manufacturer WHERE open_year < 1990
SELECT max(num_of_shops) FROM manufacturer WHERE open_year  <  1990
SELECT max(num_of_shops) ,  avg(Num_of_Factories) FROM manufacturer WHERE open_year  <  1990
Final question: what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.
Final SQL: SELECT max(num_of_shops) ,  avg(Num_of_Factories) FROM manufacturer WHERE open_year  <  1990
Database: manufacturer
Question sequence:
What is the furniture id number of the most expensive furniture?
How about the manufacturer number?
What is the name of the manufacturer?
Also show how many shops they have.
SQL query sequence:
SELECT furniture_id FROM furniture_manufacte ORDER BY Price_in_Dollar DESC 1
SELECT manufacturer_id FROM furniture_manufacte ORDER BY Price_in_Dollar DESC 1
SELECT t1.manufacturer_id FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id  =  t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1
SELECT t1.manufacturer_id ,  t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id  =  t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1
Final question: Find the id and number of shops for the company that produces the most expensive furniture.
Final SQL: SELECT t1.manufacturer_id ,  t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id  =  t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1
Database: manufacturer
Question sequence:
How many distinct manufacturers are there?
How many produce furniture?
What are their names?
Also show how many furniture types each manufacturer produces.
SQL query sequence:
SELECT count(DISTINCT manufacturer_id) FROM manufacturer
SELECT count(DISTINCT t1.manufacturer_id) FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id
SELECT DISTINCT t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id
SELECT count(*) ,  t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id  =  t2.manufacturer_id GROUP BY t1.manufacturer_id
Final question: Find the number of funiture types produced by each manufacturer as well as the company names.
Final SQL: SELECT count(*) ,  t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id  =  t2.manufacturer_id GROUP BY t1.manufacturer_id
Database: manufacturer
Question sequence:
How many different furniture items are there?
How many are sold by manufacturers in our records?
Which furniture names are not in our records?
Also show their market rates.
SQL query sequence:
SELECT count(DISTINCT furniture_id) FROM furniture
SELECT count(DISTINCT furniture_id) FROM furniture WHERE furniture_id IN (SELECT furniture_id FROM furniture_manufacte)
SELECT name FROM furniture WHERE furniture_id NOT IN (SELECT furniture_id FROM furniture_manufacte)
SELECT market_rate, name FROM furniture WHERE furniture_id NOT IN (SELECT furniture_id FROM furniture_manufacte)
Final question: Find the market shares and names of furnitures which no any company is producing in our records.
Final SQL: SELECT Market_Rate ,  name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte)
Database: school_bus
Question sequence:
How many drivers are there?
How many drivers does each city have?
Which city has the most drivers?
SQL query sequence:
SELECT COUNT(*) FROM driver
SELECT home_city, count(*) FROM driver GROUP BY home_city
SELECT home_city FROM driver GROUP BY home_city ORDER BY count(*) DESC LIMIT 1
Final question: Show the home city with the most number of drivers.
Final SQL: SELECT home_city FROM driver GROUP BY home_city ORDER BY count(*) DESC LIMIT 1
Database: school_bus
Question sequence:
How many different parties are there?
How many drivers are from Hartford?
Among these drivers, how many of them are older than 40?
Show their parites.
SQL query sequence:
SELECT COUNT(DISTINCT party) FROM driver
SELECT COUNT(*) FROM driver WHERE home_city  =  'Hartford'
SELECT COUNT(*) FROM driver WHERE home_city  =  'Hartford' AND age  >  40
SELECT party FROM driver WHERE home_city  =  'Hartford' AND age  >  40
Final question: Show the party with drivers from Hartford and drivers older than 40.
Final SQL: SELECT party FROM driver WHERE home_city  =  'Hartford' AND age  >  40
Database: school_bus
Question sequence:
How many drivers are older than 30?
How many are older than 40?
Show their home cities.
Among these cities, which one has at least two drivers older than 40?
SQL query sequence:
SELECT COUNT(*) FROM driver WHERE age  >  30
SELECT COUNT(*) FROM driver WHERE age  >  40
SELECT home_city FROM driver WHERE age  >  40
SELECT home_city FROM driver WHERE age  >  40 GROUP BY home_city HAVING count(*)  >=  2
Final question: Show home city where at least two drivers older than 40 are from.
Final SQL: SELECT home_city FROM driver WHERE age  >  40 GROUP BY home_city HAVING count(*)  >=  2
Database: school_bus
Question sequence:
Show the hometowns of the drivers who are older than 40.
How many different cities are there?
What are the cities that do not have a driver older than 40?
SQL query sequence:
SELECT home_city FROM driver WHERE age  >  40
SELECT COUNT(DISTINCT home_city) FROM driver
SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age  >  40
Final question: Show all home cities except for those having a driver older than 40.
Final SQL: SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age  >  40
Database: school_bus
Question sequence:
How many drivers are there that have a school bus?
How about the number of drivers without a school bus?
Show these drivers' names.
SQL query sequence:
SELECT COUNT(*) FROM driver WHERE driver_id IN (SELECT driver_id FROM school_bus)
SELECT COUNT(*) FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus)
SELECT name FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus)
Final question: Show the names of the drivers without a school bus.
Final SQL: SELECT name FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus)
Database: school_bus
Question sequence:
How many different types of schools are there?
For each type, how many schools are there?
Which types have two schools?
SQL query sequence:
SELECT COUNT(DISTINCT TYPE) FROM school
SELECT TYPE, COUNT(*) FROM school GROUP BY TYPE
SELECT TYPE FROM school GROUP BY TYPE HAVING count(*)  =  2
Final question: Show the types of schools that have two schools.
Final SQL: SELECT TYPE FROM school GROUP BY TYPE HAVING count(*)  =  2
Database: school_bus
Question sequence:
How many different schools are there?
Which schools have school buses?
Please also show the names of the drivers.
SQL query sequence:
SELECT COUNT(*) FROM school
SELECT T2.school FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id
SELECT T2.school ,  T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id JOIN driver AS T3 ON T1.driver_id  =  T3.driver_id
Final question: Show the school name and driver name for all school buses.
Final SQL: SELECT T2.school ,  T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id JOIN driver AS T3 ON T1.driver_id  =  T3.driver_id
Database: school_bus
Question sequence:
What are the top 3 number of years spent working on a school bus?
What is the maximum years spent working on a school bus?
Please also show the minimum and average years.
SQL query sequence:
SELECT years_working FROM school_bus ORDER BY years_working DESC LIMIT 3
SELECT max(years_working) FROM school_bus
SELECT max(years_working) ,  min(years_working) ,  avg(years_working) FROM school_bus
Final question: What is the maximum, minimum and average years spent working on a school bus?
Final SQL: SELECT max(years_working) ,  min(years_working) ,  avg(years_working) FROM school_bus
Database: school_bus
Question sequence:
How many schools do not have a school bus?
What are the names of these schools?
Please also show the school types.
SQL query sequence:
SELECT COUNT(*) FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)
SELECT school FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)
SELECT school ,  TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)
Final question: Show the school name and type for schools without a school bus.
Final SQL: SELECT school ,  TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)
Database: school_bus
Question sequence:
How many schools have a school bus?
How many school buses does each school type have?
Please also show the types.
SQL query sequence:
SELECT count(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id
SELECT count(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T2.type
SELECT T2.type ,  count(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T2.type
Final question: Show the type of school and the number of buses for each type.
Final SQL: SELECT T2.type ,  count(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T2.type
Database: school_bus
Question sequence:
How many drivers are older than 40?
How about the number younger than 40?
Please add the number of drivers that are from Hartford.
SQL query sequence:
SELECT count(*) FROM driver WHERE age  >  40
SELECT count(*) FROM driver WHERE age  <  40
SELECT count(*) FROM driver WHERE home_city  =  'Hartford' OR age  <  40
Final question: How many drivers are from Hartford city or younger than 40?
Final SQL: SELECT count(*) FROM driver WHERE home_city  =  'Hartford' OR age  <  40
Database: school_bus
Question sequence:
How many drivers are from Hartford?
Among these drivers, how many of them are younger than 40?
Show their names.
SQL query sequence:
SELECT COUNT(*) FROM driver WHERE home_city  =  'Hartford'
SELECT COUNT(*) FROM driver WHERE home_city  =  'Hartford' AND age  <  40
SELECT name FROM driver WHERE home_city  =  'Hartford' AND age  <  40
Final question: List names for drivers from Hartford city and younger than 40.
Final SQL: SELECT name FROM driver WHERE home_city  =  'Hartford' AND age  <  40
Database: cre_Doc_Tracking_DB
Question sequence:
Show information for all calendar items.
How many are there?
SQL query sequence:
SELECT * FROM Ref_calendar
SELECT count(*) FROM Ref_calendar
Final question: How many calendar items do we have?
Final SQL: SELECT count(*) FROM Ref_calendar
Database: cre_Doc_Tracking_DB
Question sequence:
Show all calendar items.
Only show the calendar dates and day numbers for them.
SQL query sequence:
SELECT * FROM Ref_calendar
SELECT calendar_date ,  day_Number FROM Ref_calendar
Final question: Show all calendar dates and day Numbers.
Final SQL: SELECT calendar_date ,  day_Number FROM Ref_calendar
Database: cre_Doc_Tracking_DB
Question sequence:
Show all document types.
How many are there?
SQL query sequence:
SELECT * FROM Ref_document_types
SELECT count(*) FROM Ref_document_types
Final question: Show the number of document types.
Final SQL: SELECT count(*) FROM Ref_document_types
Database: cre_Doc_Tracking_DB
Question sequence:
Show all document type information.
What are their document type codes and names?
SQL query sequence:
SELECT * FROM Ref_document_types
SELECT document_type_code ,  document_type_name FROM Ref_document_types
Final question: List all document type codes and document type names.
Final SQL: SELECT document_type_code ,  document_type_name FROM Ref_document_types
Database: cre_Doc_Tracking_DB
Question sequence:
Show the name and description for all document types.
Filter the results for only those with code RV.
SQL query sequence:
SELECT document_type_name ,  document_type_description FROM Ref_document_types
SELECT document_type_name ,  document_type_description FROM Ref_document_types WHERE document_type_code  =  "RV"
Final question: What is the name and description for document type code RV?
Final SQL: SELECT document_type_name ,  document_type_description FROM Ref_document_types WHERE document_type_code  =  "RV"
Database: cre_Doc_Tracking_DB
Question sequence:
Show all the document type codes.
What is the code for the document type named "Paper"?
SQL query sequence:
SELECT document_type_code FROM Ref_document_types
SELECT document_type_code FROM Ref_document_types WHERE document_type_name  =  "Paper"
Final question: What is the document type code for document type "Paper"?
Final SQL: SELECT document_type_code FROM Ref_document_types WHERE document_type_name  =  "Paper"
Database: cre_Doc_Tracking_DB
Question sequence:
How many documents are there in total?
How about the number for those with document type code CV?
How about CV or BK?
SQL query sequence:
SELECT count(*) FROM All_documents
SELECT count(*) FROM All_documents WHERE document_type_code  =  "CV"
SELECT count(*) FROM All_documents WHERE document_type_code  =  "CV" OR document_type_code  =  "BK"
Final question: Show the number of documents with document type code CV or BK.
Final SQL: SELECT count(*) FROM All_documents WHERE document_type_code  =  "CV" OR document_type_code  =  "BK"
Database: cre_Doc_Tracking_DB
Question sequence:
Show the info for all documents.
How about those with name "Marry CV"?
Show its date stored.
SQL query sequence:
SELECT * FROM All_documents
SELECT * FROM All_documents WHERE Document_name  =  "Marry CV"
SELECT date_stored FROM All_documents WHERE Document_name  =  "Marry CV"
Final question: What is the date when the document "Marry CV" was stored?
Final SQL: SELECT date_stored FROM All_documents WHERE Document_name  =  "Marry CV"
Database: cre_Doc_Tracking_DB
Question sequence:
Show date stored for all the documents.
Also show their day numbers.
SQL query sequence:
SELECT Date_Stored FROM All_documents
SELECT T2.day_Number ,  T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored  =  T2.calendar_date
Final question: What is the day Number and date of all the documents?
Final SQL: SELECT T2.day_Number ,  T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored  =  T2.calendar_date