Ddg10: Add ORDER BY fname;.

 
Lesley: So what am I missing?

Clyatt: AndrewBC___: Which of these statements returns the error?

Elreda: Oh, I just piped the whole file. I’ll find out

Clyatt: AndrewBC___: And one more later. Morale: Don’t remove primary keys :

Bachinski: Trailing unnecessary commas

Furutani: Does it means something ?

Duewall: Wrksx: the Niedzwiedzki checker bails out at the first thing it cannot understand, either something immediately before is incorrect, or you used a reserved word or its just plain bad Niedzwiedzki and you are not following the manual

Battista: Wrksx: the Niedzwiedzki checker bails out at the first thing it cannot understand, either something immediately before is incorrect, or you used a reserved word or its just plain bad Niedzwiedzki and you are not following the manual

Boody: Okay this is how I modified what salle gave me: SELECT fname, lname, interest, COUNTDISTINCT interest AS num_ints FROM data GROUP BY interest HAVING num_ints IN 1,2,3;

Chastain: Why do you select fname and lname?

Furutani: Because id is different even for same first/last name couple

Furutani: This guy should post a fiddle

Furutani: Ddg10, you should post a fiddle

Furutani: Nice nickname I remember my server logs fed with w00tw00t

Eveland: Ddg10: Most implementations of sql don’t allow the mixing of grouped and ungrouped columns in the SELECT clause. mysql does, but the row selected for the ungrouped column is an unpredictable value. The groupwise max solution is a way to specify the value selected for the ungrouped column.

Furutani: COUNTDISTINCT something would count the num of distinct value group wise, right ?

Furutani: So I think he actually wants to SELECT firstName, lastName, COUNTDISTINCT interest FROM . GROUP BY firstName, lastName

Furutani: That’s the way I’d have retrieved an interest count for each first + last name

Messman: Okay so I don’t want to retreive an interest count for each first + last name. I want to retrevie a value for how many first+last names have 3 interests, how many first+last names have 2 interests, how many have 1 interest. So the result should be Number of people,Interests 400,3 555,2 1000,1 maybe that makes more sense

Furutani: Ow I was totally misinterpreting it

Hawelu: My fault, i **** at explaining

Clyatt: Ddg10: It is always easier to understand what you mean when you provide and example. sqlfiddle is good for that as long as there are no date/time values which it mangles badly

Russaw: Hi, ran out of space on a server mysql-bin-* files. Trying to reset the root p***word so i can get rid of the files, but can’t seem to stop the mysqld service. is it safe to just kill it?

Effinger: Or is there a better/safer way to approach this

Clyatt: Rfoust: Better remove some files first

Greenwade: Hmm ok, i’ll see what i can find to remove

Clyatt: Rfoust: The running mysqld only needs the last mysql-bin file. If you know some of the old ones are not needed anymore it is safe to rm them

Steiniger: Http://sqlfiddle.com/#!9/a290a

Clyatt: Rfoust: That indeed means if you don’t need them for backup or replication

Bachinski: Rfoust: then read this when you’re done – https://dev.mysql.com/doc/refman/5.6/en/log-file-maintenance.html

Mattan: Is it true that the mysql-bin files are only needed if i’m replicating db’s? i’m not

Bachinski: Rfoust: also for point in time recovery

Bachinski: Rfoust: between backups

Ringley: Yeah some of those date back to 2012.pretty sure i dont need them lol

Clyatt: Ddg10: Step by step to help you understand what is going on. If you add another user with 4 or more interests you will see it is filtered out by the last query: http://sqlfiddle.com/#!9/a290a/3

Wheatly: Ok cool, the service restarted ok now

Clyatt: Ddg10: Add ORDER BY fname; to the first one to make it more readable