Listing 1: Query to Select Sales Information and Create a Data Set SELECT CONVERT(char(10), sales.ord_date, 101) AS ord_date, sales.qty, stores.stor_name, titles.title FROM sales INNER JOIN stores ON sales.stor_id = stores.stor_id INNER JOIN titles ON sales.title_id = titles.title_id WHERE (sales.ord_date BETWEEN @StartDate AND @EndDate) AND (stores.stor_id = @StoreID) ORDER BY stores.stor_name, CONVERT(char(10), sales.ord_date, 101), titles.title 1