Sounds like homework. Post the code you have written and the problem you have and we can help straighten it out. The best way to learn these methods is to try them yourself.
Use the SQL functions you have learned…
something like this partial piece of code..
/* convert current date for date range extraction */
DECLARE @CurrentDateTime Datetime
set @CurrentDateTime = getdate()
DECLARE @CurrYY varchar(6)
set @CurrYY = substring(CONVERT(VARCHAR(6), @CurrentDateTime, 12),1,2)
DECLARE @CurrMMDD varchar(6)
set @CurrMMDD = substring(CONVERT(VARCHAR(6), @CurrentDateTime, 12),3,4)
/* convert current date to 7 days prior for date range extraction */
DECLARE @StartDateTime Datetime
set @StartDateTime = DATEADD(day,-7, getdate())