Hi everyone, i would like some help with a couple of mysql queries.
I have a table of data which looks like this :
And represents a transaction log for players of a game.
The ID is the primary key (auto incremented).
DATETIME is the date and time of the transaction.
USERNAME is useless. :D
PCNAME is a description of the physical computer in which the player was when the trasaction was made. MAX number of PCs is 30 so values can be PC1-PC30.
PLAYER is the name of the player.
CREDIT_A, B, C, D are game values, all Unsigned integers.
GAMEDAY is a value representing the virtual "in-game" DAY.
What i want to ask the Database is :
Given a list of player names (PLAYER column) , lets say (NICK, PETER), calculate the SUM of each credit type (CREDIT_A,CREDIT_B,CREDIT_C,CREDIT_D) for the last 3 game days (GAMEDAY) and show it seperately for each of those gamedays.
So the resulting table will look like :
Can i achive it somehow?
Thanks in advance!