Dawn: Rewrite it without SELECT * . GROUP BY.
Correl: Lucid: You will not break anything which is not broken already :
Berard: Won’t mysql prevent it from executing?
Tamai: I’m simply saying it gives me the results I expect, maybe it shouldn’t work but it definitely does have the appearance of working
Correl: Lucid: Your query returns something and you can’t tell what exactly
Keiter: Lucid: no, it doesn’t give you the expected results
Mudra: Interesting since I’ve had about 1000 sessions with only a complaint about this one issue
Klotz: I’m not saying you guys are wrong but
Trembley: The data is independently verifiable and no one has said anything
Keiter: Lucid: ok. Best of luck to you.
Eriks: Keiter: I’m not dismissing you
Keiter: Lucid: you kind of are, yes.
Souser: In any event the query needs to be rewritten so I’m going to try to figure out how to do that
Correl: Lucid: This is what you are doing: http://sqlfiddle.com/#!9/55bcd/1 Can you explain the result and why it contains these values? Can you tell if the result will be same if you run the query multiple times without modifying data?
Vandernoot: Since I’m grouping by sellerId I suppose I need to have a query with sellerId in the WHERE clause, and then join all of the things I’m selecting?
Keiter: Lucid: any column that you select that isn’t part of the group by clause and not using an aggregation function returns non-deterministic results.
Correl: Lucid: Try answering my questions and you will see .
Gremel: Keiter: and not functionally dependent on the group by terms.
Rudi: Keiter: But that includes expressions not in your list.
Keiter: Xgc: but I suspect most of this is outside the scope of his understanding at the moment
Correl: Xgc: It is guaranteed with * and join that there is no functional dependency
Mezzenga: Salle: I understand the problem, honestly. the facts I had just didn’t appear to support that cir***stance, is what I was getting at and was so apparently misinterpreted about
Correl: Lucid: Can you try answering the questions I asked about that sqlfiddle example?
Staber: Salle: of course not.
Correl: Lucid: Why not? You said your query “works”.
Mayville: Salle: I said it “does have the appearance of working”
Minnerly: Salle: please, I’d rather even not continue beating this dead horse. If you don’t want to help me that’s fine
Keiter: We are *trying* to help you.
Pergerson: Keiter: I am trying to figure out what the fix is
Brathwaite: Keiter: but I am being asked to examine a case similar to what I am agreeing to abandon
Keiter: Lucid: well, did you understand my answer, and Xgc’s comment?
Correl: Lucid: There is no fix for somethng that makes no sense :
Collum: Salle: Not strictly. I believe it’s transitive. A-B, B-C, then A-C
Correl: Lucid: Better explain what are you trying to do
Prowell: Keiter: yes but I am still confused about how I will change the relation of these things
Keiter: Lucid: do you know what a derived table is?
Moseman: Salle: This particular query is for a name-based search the :searchInput placeholder below. For each match the change in rank and number of days that change took are calculated and returned along with regular data pulled from the tables.
Correl: Lucid: As a side note that :searchInput placeholder is another bad idea when optimizing query :
Lysne: Keiter: I can’t find anything that distinguishes it from the results of SELECT within another query, is there any difference?
Wentzlaff: Maybe I just didn’t know the proper name, I always called them “subqueries”, I didn’t realize they constituted “tables”
Keiter: Lucid: that probably means you don’t know what a derived table is.