Paredez: TheMineBench: Look at the fiddle. There are duplicates in the result. By definition, that’s what you asked to find.
Flis: Basically I have L Lists and T tasks, I want to find all Lists where there are no tasks with T.status = ‘incomplete’
Eady: TheMineBench: In the last N rows per account, look for a clientId that appears more than once.
Berrong: Where T.status = complete will give me Lists with complete and incomplete tasks
Alman: Ziro: Correct. That’s part of the join criteria. Alternatively, you could use aggregation.
Limardi: Yes, hence why I’m here
Charlot: Ziro: ON condition1 AND condition2
Pettyjohn: Ziro: Try using sqlfiddle.com and show a specific case you are having trouble with. Show the exact query you tried.
Dellaripa: Xgc, i think you may have given me enough, ta
Side: Ziro: It’s a very simple problem.
Kolakowski: TheMineBench: By duplicates, I mean the list of the last 5 clientIds contains some ids two or more times.
Buie: TheMineBench: Isn’t that what you are looking for?
Bodiford: Or did your computer stop working again?
Fiedtkou: TheMineBench: Blink once if your computer is working.
Agnelli: Xgc: I’m confused. I have and clientId for a user and I’m trying to check if that user logged on with the clientId in the past 5 logins.
Timpone: Xgc: The accountId, clientId is primary, so there cannot be multiple clientIds per accountId.
Geiselman: TheMineBench: That’s not what you asked. You said you have an accountId and you wish to fond if the last 5 logins for that account used the same clientId more than once.
Gilzow: TheMineBench: So you didn’t ask the right question?
Grabski: Xgc: I suppose I did if that’s what I asked, I’m sorry.
Rindal: TheMineBench: Note your use of the phrase: “for that account”
Rapozo: Xgc: Ah, yes I mis typed, I’m sorry :
Urankar: TheMineBench: So which rows do you want to search?
Hassard: TheMineBench: The last 5 rows that match what criteria?
Stonecipher: The last 5 logins that have the accountId of the user
Wiggens: TheMineBench: Ouch. You did it again.
Krah: TheMineBench: Just “that account” ?
Schnake: TheMineBench: Think for a few minutes and then ask again, when you are not so confused.
Batson: TheMineBench: I suspect you asked the right question originally and you confused yourself just recently to think clientId was unique.
Ronning: TheMineBench: Users have accounts, correct? They connect from different clients clientIds, correct or no?
Fontaine: TheMineBench: Each user has one account, yes?
Enzenauer: I think your computer stopped working again.
Palaspas: Xgc: Correct, each user has an account.
Alley: Xgc: They will usually login from the same client,
Heines: TheMineBench: So now look at the last 15 minutes of your conversation and tell me which of your comments to ignore.
Knows: TheMineBench: You just completely reversed again and are asking the original question again.
Mcvea: TheMineBench: One sentence, tell me what result you wish to generate.
Chall: Deason: so curiously enough the 2nd and 3rd query show the same explain plan as well as same handler variables exactly but 3rd query runs in 1s vs 5-15M lol
Jarrells: I have a stupidly simple question, but I genuinely can’t figure out D:
Sun: TheMineBench: If you can’t ask the same question twice in a row, I can’t really lead you through the problem step by step. Each time we take a step, you change the question.
Fyles: How do I set the url at which my mySQL db is accessed at?
Ickert: You mean the ip address?
Comeaux: Mysql doesn’t have a web address per say.
Deason: Mwillbanks: 5.7 does ;