List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
CREATE TABLE ship (lost_in_battle VARCHAR, name VARCHAR); CREATE TABLE battle (name VARCHAR, date VARCHAR, id VARCHAR)
SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE ship (lost_in_battle VARCHAR, name VARCHAR); CREATE TABLE battle (name VARCHAR, date VARCHAR, id VARCHAR) Question: List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta' [/INST] SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta' </s>