Clodfelter: Salle: not that that’s a good reason, there’s no need for it, but it was just what I did while looking at things
Mosha: Salle: I’m doing what Xgc said and just getting something “to work”
Correl: Lucid: Why the hell you SELECT . FROM SELECT x,y FROM tbl WHERE something ?
Wanzek: 14:45:11 Xgc lucid: So. STOP worrying about performance until you have more than one *working query* to compare.
Correl: Lucid: Why the hell you use SELECT . FROM SELECT x,y FROM tbl WHERE something when you can do the same with: SELECT x,y FROM tbl WHERE something ?
Grefe: Salle: because that query is going to need ot be wrapped inevitably and I didnt want to change it and change it back
Correl: Lucid: Compare your http://sqlfiddle.com/#!9/8da731/1 and http://sqlfiddle.com/#!9/8da731/4
Correl: Lucid: Inevitably? What are you talking about?
Loving: Salle: for example in the current query I can’t select currentRank – lastRank as rankChange
Puzo: Salle: because currentRank isn’t known in that context
Hadlock: So it needs to be in an outer query?
Wilmott: I’m not sure about that but also don’t have any good way of knowing
Correl: Lucid: Nope. You can do it with HAVING clause
Keiter: Salle: he’s trying to learn aggregation in baby steps
Correl: Keiter: That’s not baby step
Minutillo: Keiter: if there’s a cliff you can throw me off of, by all means ;
Keiter: Salle: I’m just telling you the outcome of the last discussion
Hutchinson: I cant just haul off and write a huge query
Willia: Then get garbage results
Kapelke: And go “oh well, one of my 43 components, joins, aggregates, etc. is wrong. I’ll never know”
Wichman: I need to go from something working with a small edit to something not working so I know what is broken
Manny: That process isn’t going to result in tidy SQL
Gurtner: And while line 4 is the same as MAX
Weisenberg: I don’t know how to achieve line 5 with MAX or other aggregate functions
Pastick: Except MIN if I had 2 rows, but then I’d need to isolate those two rows and, well. we’ve been all over that.
Mennen: I’m sure this isn’t the right place to ask, but I’m trying to get some help on understanding the normal forms in database design; anyone able to redirect me to a proper resource?
Correl: Bloooooo: There are tons of them around
Correl: Bloooooo: You can start with Wikipedia for example
Correl: Bloooooo: https://en.wikipedia.org/wiki/Database_normalization#List_of_Normal_Forms
Correl: Bloooooo: Don’t worry if somewere between 3rd and 4th NF you get confused
Patera: I think I understand the concepts until I try to apply them
Moors: I’ve been through wikipedia and a few library books, just can’t actually apply it
Correl: Bloooooo: Why not? In practice you rarely need to go beyond 3NF
Gropp: Salle: I think I’m missing something basic and I’m lost at the “not knowing what questions to ask” point
Correl: Bloooooo: Then don’t ask :
Correl: Bloooooo: 1NF and 2NF should be fairly easy to understand. Do you have questions about them?
Mcgathy: Salle: how can I make this better using MAX for example with line 13’s behavior without making the query orders more complicated? http://sqlfiddle.com/#!9/33ae4/1
Cloninger: If I could make a 1NF diagram I think I’d be able to normalize it, but I can’t figure out how to begin with raw data I guess
Mates: And I appreciate the help and apologize for my ignorance
Correl: Lucid: If you only want max rank it is as easy as this: http://sqlfiddle.com/#!9/8da731/20
Casgrove: Salle: again, no not max rank
Correl: Lucid: Top 2 ranks requieres more effort indeed
Deconti: Salle: indeed, this is the example for top n: http://sqlfiddle.com/#!2/464f0/7