First off, I apologize this is literally my first time dealing with SQL and I just had this placed in my lap, so if I word something in a way that doesn't make sense or ask an ignorant question then forgive me.
I need to change a line of code in this query from a date you have to manually enter every day, into a date variable that will set the date for the previous day, like Today - 1.
where statuscode = 'WW' and statusdatetime like '2015-07-21%'
So when I run this query it'll automatically assign yesterday's date.