Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALTER PROC GetAverageMilkProductionForYear (
- @year int
- ) AS
- BEGIN
- SELECT AVG(1.0 * dmp.Liters)
- FROM DailyMilkProduction dmp
- WHERE dmp.Date BETWEEN DATEFROMPARTS(@year, 1, 1) AND DATEFROMPARTS(@year + 1, 1, 1)
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement