### Database Schema:
CREATE TABLE relation (
	store_nbr	INTEGER	NULL	PRIMARY KEY,
	station_nbr	INTEGER	NULL,
	foreign key (store_nbr) references sales_in_weather (store_nbr),
	foreign key (station_nbr) references weather (station_nbr)
);

CREATE TABLE weather (
	station_nbr	INTEGER	NULL	PRIMARY KEY,
	date	DATE	NULL	PRIMARY KEY,
	tmax	INTEGER	NULL,
	tmin	INTEGER	NULL,
	tavg	INTEGER	NULL,
	depart	INTEGER	NULL,
	dewpoint	INTEGER	NULL,
	wetbulb	INTEGER	NULL,
	heat	INTEGER	NULL,
	cool	INTEGER	NULL,
	sunrise	TEXT	NULL,
	sunset	TEXT	NULL,
	codesum	TEXT	NULL,
	snowfall	REAL	NULL,
	preciptotal	REAL	NULL,
	stnpressure	REAL	NULL,
	sealevel	REAL	NULL,
	resultspeed	REAL	NULL,
	resultdir	INTEGER	NULL,
	avgspeed	REAL	NULL
);

CREATE TABLE sales_in_weather (
	date	DATE	NULL	PRIMARY KEY,
	store_nbr	INTEGER	NULL	PRIMARY KEY,
	item_nbr	INTEGER	NULL	PRIMARY KEY,
	units	INTEGER	NULL
);

### User's Query:
On how many days with the max temperature over 90 did the sale of item no.5 in store no.3 exceed 100?

### Extra Knowledge:
max temperature over 90 refers to tmax > 90; item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; sale exceed 100 refers to units > 100; number of days refers to count (date)
SELECT SUM(CASE WHEN units > 100 THEN 1 ELSE 0 END) AS count FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND SUBSTR(T1.`date`, 1, 4) = '2012' AND T1.item_nbr = 5 AND tmax > 90