human
Schema:
Web_client_accelerator (id, name, Operating_system, Client, Connection)
browser (id, name, market_share)
accelerator_compatible_browser (accelerator_id, browser_id, compatible_since_year)
Please answer with SQL.
assistant
Sure, I understand.
human
How many accelerators are not compatible with the browsers listed ?
assistant
SELECT count(*) FROM web_client_accelerator WHERE id NOT IN ( SELECT accelerator_id FROM accelerator_compatible_browser );
human
What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?
assistant
SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T3.name = 'CProxy' AND T2.compatible_since_year > 1998
human
What is the id and name of the browser that is compatible with the most web accelerators?
assistant
SELECT T1.id , T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
human
What distinct accelerator names are compatible with the browswers that have market share higher than 15?
assistant
SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15;
human
Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.
assistant
SELECT name , operating_system FROM web_client_accelerator EXCEPT SELECT T1.name , T1.operating_system FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.name = 'Opera'
human
Which accelerator name contains substring 'Opera'?
assistant
SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%" ;