Timeline for Query to compare two subsets of data from the same table?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 30, 2013 at 23:22 | comment | added | Michael - sqlbot | An interesting MySQL quirk that you may bump into is that if you try to create a view from this query, MySQL won't let you because of the "subquery in the from clause," which isn't supported in views... but, the workaround is simple enough... if you (1) make a view that returns "SELECT DISTINCT server, software FROM gocore" and then (2) use that view in this query instead of the derived table, then (3) create a view out of the new query that uses the view instead of the derived table... that works fine. | |
S Sep 30, 2013 at 21:01 | history | suggested | gowenfawr | CC BY-SA 3.0 |
Fixed typo 'sofware' in SELECT and changed n.tag from 'old' to 'new'
|
Sep 30, 2013 at 21:00 | vote | accept | gowenfawr | ||
Sep 30, 2013 at 20:55 | comment | added | gowenfawr | Perfect, that does work (after minor typo fixes, I edited to fix)! Thanks, not just for the solution but for giving me some keywords (derived / implicit temporary table) to go learn about. | |
Sep 30, 2013 at 20:54 | review | Suggested edits | |||
S Sep 30, 2013 at 21:01 | |||||
Sep 30, 2013 at 20:45 | history | answered | Michael - sqlbot | CC BY-SA 3.0 |