Jump to content

scottyxy

Members
  • Posts

    4
  • Joined

  • Last visited

scottyxy's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Yeha thanks heaps for the explanation, thats pretty much what im trying to say i just didnt know how to say it. When working with 2 of the tables ALL the sums work fine. for boths (WARS and VCLSCORES) and (WARS and OTHERSCORES) Add the 3rd table to the equation and like you said the sums get multiplied.
  2. I have tried as you suggested, but it still does not explain my confusion.I am able to get the SUM for flags column from both VCLSCORES and OTHERSCORE for each war seperately but when i try to get them both in the same query thats when my numbers become stupidly high.For some reason the first row of the query gets multiplied by 4 and all the following columns get multiplied by 2, at least thats the patern i am picking up :-( Nothign ever goes right for me. We do my queries work individually but not when i try and get BOTH SUMS togwether??
  3. I tried the query you provided and i am still getting really high numbers. The query works but the numbers being returned are not accurate for some reason, and i dont know why?
  4. Hey guys im new to the forum loocated it when looking for help with this query, i know the basics of SQl but want to further my knowledge.Here is the situation I have 4 tables MEMBERS, WAR, VCLSCORES and OTHERSCORESIm basically just mucking around creating a stats table that displays scores in flags for all clan wars played by my clan. the WAR table consists of WarIdMapModeTime ClanPlayedVCLSCORES table consists ofWarIdIdNo (used to retrieve member details from member table)KillsDeathsFlagsOTHERSCORES consists of WarIdNameKillsDeathsFlagsI am trying to create a query that will grab all the details from WAR and a SUM of the flags columns from each VCLSCORES and OTHERSCORES for every war. I can get the query to work for WAR and VCLSCORES but as soon as i try to get the SUM for OTHERSCORES aswell i get a whole heaps of crap numbers.This is the query i am using to get the two tables workingSELECT WAR.WarId, WAR.Map, WAR.Mode, WAR.Time, WAR.ClanPlayed, SUM(VCLSCORES.Flags)FROM VCLSCORES INNER JOIN WAR ON VCLSCORES.WarId = WAR.WarIdWHERE VCLSCORES.WarId = WAR.WarIdGROUP BY WAR.WarId Any ideas how to add a SUM for OTHERSCORES into this query????Please help.Thanks guys
×
×
  • Create New...