Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 389 Bytes

ex43.md

File metadata and controls

21 lines (14 loc) · 389 Bytes

Exercise: 43

Get the battles that occurred in years when no ships were launched into water.

Solution

SELECT name
FROM battles
WHERE DATEPART(yyyy, date) NOT IN (
	SELECT launched
	FROM ships
	WHERE launched IS NOT NULL
)

References

  1. DATEPART (Transact-SQL)