Any clever SQL people out there? Given the raw data on the left, (a table of test results) how do I write a SQL query to give me the results on the right, (the results grouped by date as well as grouped by result)?
Follow

@aaronpk I know you're going to have to join the table twice, once where "success = 1" and second where "success = 0", probably where successdate (as date_format(date,'%Y-%m-%d')) = faildate (as date_format(date,'%Y-%m-%d')). But you have to get sums in there, too.

Now I need to watch this for someone to come in and solve it.

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Mastodon @ SDF

"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko