At the moment I have a view created, see it here in the answer. How can I create a function on that cross tab, so I can pass a date, and get data for the specific date?
Also is it a good practice to call that function multiple times to fill for example a chart?