### Database Schema:
CREATE TABLE river (
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	River	TEXT	NULL,
	Lake	TEXT	NULL,
	Sea	TEXT	NULL,
	Length	REAL	NULL,
	SourceLongitude	REAL	NULL,
	SourceLatitude	REAL	NULL,
	Mountains	TEXT	NULL,
	SourceAltitude	REAL	NULL,
	EstuaryLongitude	REAL	NULL,
	EstuaryLatitude	REAL	NULL,
	foreign key (Lake) references lake (Name)
);

CREATE TABLE ethnicGroup (
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Percentage	REAL	NULL,
	foreign key (Country) references country (Code)
);

CREATE TABLE city (
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country	TEXT	NOT NULL	DEFAULT '',
	Province	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Population	INTEGER	NULL,
	Longitude	REAL	NULL,
	Latitude	REAL	NULL,
	foreign key (Province) references province (Name),
	foreign key (Country) references country (Code),
	foreign key (Country) references province (Name)
);

CREATE TABLE located (
	City	TEXT	NULL,
	Province	TEXT	NULL,
	Country	TEXT	NULL,
	River	TEXT	NULL,
	Lake	TEXT	NULL,
	Sea	TEXT	NULL,
	foreign key (Country) references province (Name),
	foreign key (Country) references country (Code),
	foreign key (Sea) references sea (Name),
	foreign key (Province) references province (Name),
	foreign key (Province) references city (Name),
	foreign key (City) references city (Name),
	foreign key (River) references river (Name),
	foreign key (Lake) references lake (Name)
);

CREATE TABLE mountainOnIsland (
	Mountain	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Island	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Mountain) references mountain (Name),
	foreign key (Island) references island (Name)
);

CREATE TABLE island (
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Islands	TEXT	NULL,
	Area	REAL	NULL,
	Height	REAL	NULL,
	Type	TEXT	NULL,
	Longitude	REAL	NULL,
	Latitude	REAL	NULL
);

CREATE TABLE religion (
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Percentage	REAL	NULL,
	foreign key (Country) references country (Code)
);

CREATE TABLE geo_source (
	River	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Province	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Country) references country (Code),
	foreign key (Country) references province (Name),
	foreign key (River) references river (Name),
	foreign key (Province) references province (Name)
);

CREATE TABLE country (
	Name	TEXT	NOT NULL,
	Code	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Capital	TEXT	NULL,
	Province	TEXT	NULL,
	Area	REAL	NULL,
	Population	INTEGER	NULL
);

CREATE TABLE geo_island (
	Island	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Province	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Country) references province (Name),
	foreign key (Island) references island (Name),
	foreign key (Country) references country (Code),
	foreign key (Province) references province (Name)
);

CREATE TABLE lake (
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Area	REAL	NULL,
	Depth	REAL	NULL,
	Altitude	REAL	NULL,
	Type	TEXT	NULL,
	River	TEXT	NULL,
	Longitude	REAL	NULL,
	Latitude	REAL	NULL
);

CREATE TABLE politics (
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Independence	DATE	NULL,
	Dependent	TEXT	NULL,
	Government	TEXT	NULL,
	foreign key (Country) references country (Code),
	foreign key (Dependent) references country (Code)
);

CREATE TABLE sea (
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Depth	REAL	NULL
);

CREATE TABLE borders (
	Country1	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country2	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Length	REAL	NULL,
	foreign key (Country1) references country (Code),
	foreign key (Country2) references country (Code)
);

CREATE TABLE desert (
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Area	REAL	NULL,
	Longitude	REAL	NULL,
	Latitude	REAL	NULL
);

CREATE TABLE target (
	Country	TEXT	NOT NULL	PRIMARY KEY,
	Target	TEXT	NULL,
	foreign key (Country) references country (Code)
);

CREATE TABLE population (
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Population_Growth	REAL	NULL,
	Infant_Mortality	REAL	NULL,
	foreign key (Country) references country (Code)
);

CREATE TABLE economy (
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	GDP	REAL	NULL,
	Agriculture	REAL	NULL,
	Service	REAL	NULL,
	Industry	REAL	NULL,
	Inflation	REAL	NULL,
	foreign key (Country) references country (Code)
);

CREATE TABLE geo_mountain (
	Mountain	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Province	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Mountain) references mountain (Name),
	foreign key (Country) references country (Code),
	foreign key (Country) references province (Name),
	foreign key (Province) references province (Name)
);

CREATE TABLE geo_lake (
	Lake	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Province	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Lake) references lake (Name),
	foreign key (Country) references country (Code),
	foreign key (Province) references province (Name),
	foreign key (Country) references province (Name)
);

CREATE TABLE mergesWith (
	Sea1	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Sea2	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Sea2) references sea (Name),
	foreign key (Sea1) references sea (Name)
);

CREATE TABLE geo_estuary (
	River	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Province	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Province) references province (Name),
	foreign key (Country) references province (Name),
	foreign key (River) references river (Name),
	foreign key (Country) references country (Code)
);

CREATE TABLE organization (
	Abbreviation	TEXT	NOT NULL	PRIMARY KEY,
	Name	TEXT	NOT NULL,
	City	TEXT	NULL,
	Country	TEXT	NULL,
	Province	TEXT	NULL,
	Established	DATE	NULL,
	foreign key (City) references city (Name),
	foreign key (Province) references city (Name),
	foreign key (Country) references country (Code),
	foreign key (Country) references province (Name),
	foreign key (Province) references province (Name)
);

CREATE TABLE isMember (
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Organization	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Type	TEXT	NULL	DEFAULT 'member',
	foreign key (Organization) references organization (Abbreviation),
	foreign key (Country) references country (Code)
);

CREATE TABLE geo_river (
	River	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Province	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Province) references province (Name),
	foreign key (Country) references province (Name),
	foreign key (River) references river (Name),
	foreign key (Country) references country (Code)
);

CREATE TABLE islandIn (
	Island	TEXT	NULL,
	Sea	TEXT	NULL,
	Lake	TEXT	NULL,
	River	TEXT	NULL,
	foreign key (River) references river (Name),
	foreign key (Sea) references sea (Name),
	foreign key (Lake) references lake (Name),
	foreign key (Island) references island (Name)
);

CREATE TABLE geo_desert (
	Desert	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Province	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Desert) references desert (Name),
	foreign key (Province) references province (Name),
	foreign key (Country) references country (Code),
	foreign key (Country) references province (Name)
);

CREATE TABLE geo_sea (
	Sea	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Province	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Sea) references sea (Name),
	foreign key (Country) references country (Code),
	foreign key (Country) references province (Name),
	foreign key (Province) references province (Name)
);

CREATE TABLE province (
	Name	TEXT	NOT NULL	PRIMARY KEY,
	Country	TEXT	NOT NULL	PRIMARY KEY,
	Population	INTEGER	NULL,
	Area	REAL	NULL,
	Capital	TEXT	NULL,
	CapProv	TEXT	NULL,
	foreign key (Country) references country (Code)
);

CREATE TABLE encompasses (
	Country	TEXT	NOT NULL	PRIMARY KEY,
	Continent	TEXT	NOT NULL	PRIMARY KEY,
	Percentage	REAL	NULL,
	foreign key (Continent) references continent (Name),
	foreign key (Country) references country (Code)
);

CREATE TABLE locatedOn (
	City	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Province	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Island	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	foreign key (Province) references city (Name),
	foreign key (Island) references island (Name),
	foreign key (Country) references country (Code),
	foreign key (Province) references province (Name),
	foreign key (City) references city (Name),
	foreign key (Country) references province (Name)
);

CREATE TABLE continent (
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Area	REAL	NULL
);

CREATE TABLE mountain (
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Mountains	TEXT	NULL,
	Height	REAL	NULL,
	Type	TEXT	NULL,
	Longitude	REAL	NULL,
	Latitude	REAL	NULL
);

CREATE TABLE language (
	Country	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Name	TEXT	NOT NULL	DEFAULT ''	PRIMARY KEY,
	Percentage	REAL	NULL,
	foreign key (Country) references country (Code)
);

### User's Query:
State the different ethnic group and percentage of the language in Singapore.

### Extra Knowledge:

SELECT T1.Name, T1.Percentage FROM ethnicGroup AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Singapore' GROUP BY T1.Name, T1.Percentage