Clyatt: Is it my connection or sqlfiddle is terribly slow today?
Furutani: Last time I used it it was terribly slow
Levar: Salle, Bachinski: thanks for the help, much appreciated!
Clyatt: Ddg10: It is not precise because it groups on fname only. fname, lname is slightly better, but you should have some unique user_id there because names are not unique.
Campion: Rumery, I have a question, lets say I have a space delimited string of IDs in one column of a table, is it possible to count how many items there are and place that value in new column ?
Clyatt: Ddg10: With this table best primary key should be user_id, interest to avoid inserting same interest more than once
Kipling: And I would like to count the number of items in column architecture_acc
Gorelli: Reller: SELECT LENGHTcolumn – LENGTHREPLACEcolumn, ‘ ‘, ” + 1 AS items
Kendrick: So just using an auto generated id column as the key isn’t going to really do anything for duplicate entries. say for example two people with identical names have the same interes.
Clyatt: Ddg10: http://pastie.org/10421639
Cradic: Boleware, error in SQL query 😛
Clyatt: Ddg10: Yes in this case auto_inc does not provide many benefits. You are unlikely to use it in joins either
Bachinski: Reller: simple spelling error
Clyatt: Ddg10: Even if you have PRIMARY KEYfname, lname, interest it is not enough because there could be two people with identical first and second name so better use some u_id
Fricano: Reller: 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
Clyatt: Ddg10: In that case you don’t need to store fname and lname in this table
Velazco: I dont want to be rude or look like lazy, but I have totally no clue how to use that, but I guess I have to read and figure out something similar myself, anyway thanks for tip
Mei: So I could filter the data and select all the names, remove duplicates and ***ign a u_id
Clyatt: Ddg10: Having these in separate table like user will also help you generate rows for users with 0 interests
Bachinski: Reller: the first instance of the word LENGTH has a typo. fix the spelling
Bartlet: Bachinski, yeah but I guess I have to say which table/column
Tipple: I tried SELECT architecture_acc from architecture LENGTHcolumn – LENGTHREPLACEcolumn, ‘ ‘, ” + 1 AS items;
Bradley: Really blindly trying to figure that out
Misfeldt: The LENGTH bit needs to be before the FROM bit.
Bachinski: Reller: replace column with the actual column’s name
Quilantang: SELECT LENGTHarchitecture_acc – LENGTHetc. FROM architecture WHERE.
Bachinski: Reller: select lengthcolumns_actual_name .
Clyatt: Bachinski: As we all konw wehn fistr and lsat lteter of wodrs are in palce the txet is siltl prefelcty reabalde :
Girolamo: SELECT architecture_acc,LENGTHarchitecture_acc – LENGTHREPLACEarchitecture_acc, ‘ ‘, ” + 1 AS items from architecture; seems to work
Cirrincione: Reller: http://gtowey.blogspot.com/2009/12/how-to-fix-comma-separated-list-of-doom.html
Dmitriev: Hmm no median with mysql.
Foertsch: Guess I have to output data to see distribution
Hughey: This is super sweet https://paste.debian.net/311805/
Hinckle: I’ve seen somebody draw pie charts in sql’s command line interface
Bachinski: Reller: a good resource – http://www.artfulsoftware.com/infotree/queries.php
Fabroquez: My gf who uses sql daily is impressed by sql-pie-chart 😀
Ammirata: Hmm would it be possible to just combine each row which has the same name and add each interest together so that the interests column shows all 3 interests on the same row. that way an autogenerated id would be the same as a unique user id