human
Schema:
railway (Railway_ID, Railway, Builder, Built, Wheels, Location, ObjectNumber)
train (Train_ID, Train_Num, Name, From, Arrival, Railway_ID)
manager (Manager_ID, Name, Country, Working_year_starts, Age, Level)
railway_manage (Railway_ID, Manager_ID, From_Year)
Please answer with SQL.
assistant
Sure, I understand.
human
List all the countries of the managers.
assistant
SELECT Country FROM manager;
human
How many are there?
assistant
SELECT COUNT( DISTINCT Country ) FROM manager;
human
Keep the ones where the manager age is in the range of 50 and 46
assistant
SELECT Country FROM manager WHERE Age < 50 INTERSECT SELECT Country FROM manager WHERE Age > 46 ;