I'm relatively inexperienced in SQL and I have a query I'd like to run in SQL-Server.
So I have two tables:
Sites:
Id (PK) | SiteName
and Visits:
Id (PK) | Duration | EntryTime | site_Id (FK > Sites)
I want to create a table as output from this query that looks as follows:
SiteName | MondayVisitCount | TuesdayVisitCount | etc...
I want a totalled visit count on each day of the week using the EntryTime field from the Visits table accompanied with the Site name associated with the visits. The final query should implement a date range, so it is the cumulative visits on each day of the week over that date range. It's the process of creating this new table I don't understand, any tips welcome.