15:46 < jxsl13> any sql experts here :D? 15:47 < jxsl13> https://i.imgur.com/93tyM2b.png 15:47 < pinkieval> hmm? 15:47 < jxsl13> I have git cTick = connected tick and the actual tick 15:47 < jxsl13> got* 15:48 < jxsl13> and I want all the rows with the minimum distance at one exact pTick 15:49 < jxsl13> like row 1, 5,9 15:50 <@minus> jxsl13: ORDER BY (cTick - pTick) ASC? 15:51 < jxsl13> dist is actually the distance 15:51 <@minus> oh 15:51 < jxsl13> but sadly didnt work 15:51 < jxsl13> or :O 15:52 < jxsl13> wait 15:52 <@minus> you want the rows with smallest dist for each distinct pTick? 15:52 < jxsl13> yeah 15:52 < pinkieval> SELECT DISTINCT TOP 1 dist FROM table ORDER BY dist 15:52 < pinkieval> er wait no 15:52 < jxsl13> prink stackoverflow :D? 15:53 < pinkieval> SELECT DISTINCT TOP 1 pTick FROM table ORDER BY dist 15:53 < jxsl13> pinkieval * 15:53 < jxsl13> sqlite* 15:53 <@minus> paste a .sql script with DDL & DML somewhere 15:53 <@minus> sqlite? good fucking luck 15:53 < jxsl13> x) 15:54 < jxsl13> https://pastebin.com/npcFhvmh 15:54 < jxsl13> that's the stuff for now :O 15:55 <@minus> that's not DDL+DML tho 15:55 < jxsl13> sqlite db -> https://files.johnbehm.de/share/isG4760l 15:56 <@minus> still not exactly what i asked for 15:56 < jxsl13> table structure? 15:56 <@minus> but it works 15:56 < jxsl13> is in the db ._. 15:57 <@minus> i had intended to throw the data at postgres 15:57 <@minus> because postgres is king 15:59 < pinkieval> minus: ever heard of some quote about a cannon and a fly? 15:59 <@minus> nope 15:59 <@minus> but i've heard about cannons and sparrows 16:00 < jxsl13> https://files.johnbehm.de/share/xtMHQWAn 16:00 < pinkieval> oh right, that one 16:00 < jxsl13> mysql dump, hopefully postgres takes it and there is nothing mysql preproitary stuff ._. 16:01 <@minus> what exactly are you tring to find out, jxsl13? 16:01 < jxsl13> assiciate every tick/ClientID with a nickname 16:01 <@minus> but i already said the sqlite db works too :< 16:01 < jxsl13> associate* 16:01 <@minus> what for? 16:02 < jxsl13> to know the person moving the character :D 16:02 < jxsl13> as adding that information to every line would not be wise :c 16:02 < pinkieval> SELECT * FROM table GROUP BY pTick HAVING MIN(dist); 16:02 <@minus> you want to join the player name onto each input from playerinput? 16:02 < jxsl13> yep 16:03 <@minus> if you have influence on how the data is generated i strongly suggest you generate a unique ID on joining the game and use that to associate actions 16:03 < pinkieval> yeah 16:04 < jxsl13> ok :'C 16:07 <@minus> because then you can just select from actions join players using (id) 16:07 < jxsl13> thanks for the tipp tho :D 16:07 <@minus> bonus: it's much faster 16:07 < jxsl13> true that