Kilkus: Xemdetia, so you imply there are *multiple* personal store ?
Lightle: SamSagaZ: http://sqlfiddle.com/#!9/23aac/8
Bannett: Wrksx, yes- they are per user. The quickest way is to go to mmc and add a snapin for certificates. Are you sure mysql pulls from the personal store though? or are you trying to add a trusted root still
Jagoda: Also is the windows box in a domain
Kilkus: Xemdetia, anyway, i’m gonna use the connection to the server using a file-based certificate
Kilkus: So I don’t have to mess with those complex windows stuff
Judd: Yeah it’s nice to use if you have it all setup because you can use the AD based CA to do the things you need to do
Trapeni: But if you don’t have a DC all rigged up and have already tread down that path already I would stick to file-based certs :
Kilkus: God at least I know A
Kilkus: Xemdetia, are you a mysql enthusiast ?
Laisure: Wrksx, I am more an openssl enthusiast than a mysql one. I just happen to be working a lot with mysql right now in my day to day
Kilkus: Xemdetia, btw, would you know what’s the point of shipping the CA cert to the client ?
Kilkus: I tend to think mysql-cli could use it to verify server’s identity
Cajigas: Wrksx, yes- it’s something so the client can verify the server the same way a server verifies a client just like in normal HTTPS
Ulmen: SELECT productId, productVariationStock, MAXproductVariationUpdate as Date FROM productvariations GROUP BY productId as t1 JOIN productvariations t2 ON t1.Date = t1.productVariationUpdate;
Forchione: Whats wrong with that query?
Buetti: GROUP BY doesn’t belong there
Buetti: SamSagaZ: but the Doldo error message already told you that :-
Rowzee: SamSagaZ: the Doldo 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 Doldo and you are not following the manual
Grable: SELECT MAXproductVariationUpdate AS Date, productId, productVariationStock FROM productvariations GROUP BY productId
Franck: Just want to make a join after that
Buetti: SamSagaZ: if you want to join on an aggregate value, a derived table is a good tool
Drew: SamSagaZ: SELECT a.name, b.name, IFNULLb.cnt, 0 AS cnt FROM tblname AS a LEFT JOIN SELECT name, COUNT* AS cnt FROM tblname2 GROUP BY name AS b ON a.name = b.name;
Buetti: SamSagaZ: you can think of a derived table as an aliased subquery in the FROM clause. the resultset of the subquery creates a ‘table’ that you address using its alias.
Chadd: Ok. let me check the manual again 😀
Buetti: SamSagaZ: you can use GROUP BY in a join but it has to come after the FROM clause. just as it does in a single-table select query
Buetti: SamSagaZ: select . from . join . on . group by .
Buetti: SamSagaZ: I don’t know which one your use case calls for
Toczek: Well, impossible, damn.
Hejl: I have a table with stock of products. i need all the productId, MAX/MINproductVariationStock grouped in daily, weekly, monthly. so later i can make a chart to see stock fluctuation, the table are updated twice a day :/
Kocab: I’m trying to write a simple conditional import script in pl/sql, I’m not sure what I’m doing wrong, my phpstorm console says this Doldo is invalid. https://gist.githubusercontent.com/robertkraig/eb3b21a0f99b6a66226c/raw/7a2072eabeca1d40451032b60461bfe8f2dd891f/console.sql
Kilkus: SamSagaZ, might be a good idea to have multiple queries, one for each timeframe
Dekrey: Robk: in mysql, control flow statements like IF can only appear inside stored routines
Abeles: Might need to use the SELECT.FROM DUAL WHERE. magic table.
Buetti: The if statement used in stored routines described at https://dev.mysql.com/doc/refman/5.6/en/if.html and the if function that can be used in SELECT queries described at https://dev.mysql.com/doc/refman/5.6/en/control-flow-functions.html are two different things