
CREATE TABLE department (
	"Dname" TEXT, 
	"Dnumber" INTEGER, 
	"Mgr_ssn" INTEGER, 
	"Mgr_start_date" TEXT, 
	PRIMARY KEY ("Dnumber")
)


CREATE TABLE dependent (
	"Essn" INTEGER, 
	"Dependent_name" TEXT, 
	"Sex" TEXT, 
	"Bdate" TEXT, 
	"Relationship" TEXT, 
	PRIMARY KEY ("Essn", "Dependent_name")
)


CREATE TABLE dept_locations (
	"Dnumber" INTEGER, 
	"Dlocation" TEXT, 
	PRIMARY KEY ("Dnumber", "Dlocation")
)


CREATE TABLE employee (
	"Fname" TEXT, 
	"Minit" TEXT, 
	"Lname" TEXT, 
	"Ssn" INTEGER, 
	"Bdate" TEXT, 
	"Address" TEXT, 
	"Sex" TEXT, 
	"Salary" INTEGER, 
	"Super_ssn" INTEGER, 
	"Dno" INTEGER, 
	PRIMARY KEY ("Ssn")
)


CREATE TABLE project (
	"Pname" TEXT, 
	"Pnumber" INTEGER, 
	"Plocation" TEXT, 
	"Dnum" INTEGER, 
	PRIMARY KEY ("Pnumber")
)


CREATE TABLE works_on (
	"Essn" INTEGER, 
	"Pno" INTEGER, 
	"Hours" REAL, 
	PRIMARY KEY ("Essn", "Pno")
)

CREATE TABLE department (
	"Dname" TEXT, 
	"Dnumber" INTEGER, 
	"Mgr_ssn" INTEGER, 
	"Mgr_start_date" TEXT, 
	PRIMARY KEY ("Dnumber")
)

/*
2 rows from department table:
Dname	Dnumber	Mgr_ssn	Mgr_start_date
Headquarters	1	888665555	1981-06-19
Administration	4	987654321	1995-01-01
*/


CREATE TABLE dependent (
	"Essn" INTEGER, 
	"Dependent_name" TEXT, 
	"Sex" TEXT, 
	"Bdate" TEXT, 
	"Relationship" TEXT, 
	PRIMARY KEY ("Essn", "Dependent_name")
)

/*
2 rows from dependent table:
Essn	Dependent_name	Sex	Bdate	Relationship
333445555	Alice	F	1986-04-05	Daughter
333445555	Theodore	M	1983-10-25	Son
*/


CREATE TABLE dept_locations (
	"Dnumber" INTEGER, 
	"Dlocation" TEXT, 
	PRIMARY KEY ("Dnumber", "Dlocation")
)

/*
2 rows from dept_locations table:
Dnumber	Dlocation
1	Houston
4	Stafford
*/


CREATE TABLE employee (
	"Fname" TEXT, 
	"Minit" TEXT, 
	"Lname" TEXT, 
	"Ssn" INTEGER, 
	"Bdate" TEXT, 
	"Address" TEXT, 
	"Sex" TEXT, 
	"Salary" INTEGER, 
	"Super_ssn" INTEGER, 
	"Dno" INTEGER, 
	PRIMARY KEY ("Ssn")
)

/*
2 rows from employee table:
Fname	Minit	Lname	Ssn	Bdate	Address	Sex	Salary	Super_ssn	Dno
Jonh	B	Smith	123456789	1965-01-09	731 Fondren, Houston, TX	M	30000	333445555	5
Franklin	T	Wong	333445555	1955-12-08	638 Voss, Houston, TX	M	40000	888665555	5
*/


CREATE TABLE project (
	"Pname" TEXT, 
	"Pnumber" INTEGER, 
	"Plocation" TEXT, 
	"Dnum" INTEGER, 
	PRIMARY KEY ("Pnumber")
)

/*
2 rows from project table:
Pname	Pnumber	Plocation	Dnum
ProductX	1	Bellaire	5
ProductY	2	Sugarland	5
*/


CREATE TABLE works_on (
	"Essn" INTEGER, 
	"Pno" INTEGER, 
	"Hours" REAL, 
	PRIMARY KEY ("Essn", "Pno")
)

/*
2 rows from works_on table:
Essn	Pno	Hours
123456789	1	32.5
123456789	2	7.5
*/
list the first and last names, and the addresses of all employees in the ascending order of their birth date.
SELECT fname ,  lname ,  address FROM employee ORDER BY Bdate
[{'Fname': 'James', 'Lname': 'Borg', 'Address': '450 Stone, Houston, TX'}, {'Fname': 'Jennifier', 'Lname': 'Wallace', 'Address': '291 Berry, Bellaire, TX'}, {'Fname': 'Franklin', 'Lname': 'Wong', 'Address': '638 Voss, Houston, TX'}, {'Fname': 'Ramesh', 'Lname': 'Narayan', 'Address': '975 Fire Oak, Humble, TX'}, {'Fname': 'Jonh', 'Lname': 'Smith', 'Address': '731 Fondren, Houston, TX'}, {'Fname': 'Alicia', 'Lname': 'Zelaya', 'Address': '3321 Castle, Spring, TX'}, {'Fname': 'Ahmad', 'Lname': 'Jabbar', 'Address': '980 Dallas, Houston, TX'}, {'Fname': 'Joyce', 'Lname': 'English', 'Address': '5631 Rice, Houston, TX'}]