Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help pls on combining 6 tables to get some data

Author  Topic 

raven_ramon
Starting Member

1 Post

Posted - 2011-02-28 : 14:09:29
Hello good people in sql land,

I am new to sql – i know basic of trying to combine 2 tables, but i think i need to create a query to pull data from 6 tables.
The tables are listed below with their columns.

Essentially, i am trying to get counts of unique players in a day by the gamename and network name and by the type and amount paid, where the refcode is not in 101010 (# is just for illustration). That is to say that a player can play in 1Level tournament and 2Level tournament, but he should be counted only once.

I think my issue is that the playing data in is tables 4/5/6 and not sure how to connect all that with the other 3 tables.
Can anyone of you please help me on this? I listed below what i think is needed.

Table 1: Game
Cols: Gameid, gamename, networkid
(game id is a numeric and the game name is the actual name, networkid is the machine type)

Table 2: Network
Cols: Networkid, networkname
(network id machine type and its name)

Table 3: User
Col: Userid, refcode
(general user info)

Table 4: 1LevelGame
Col: Tournamentid, userid1, userid2

Table 5: 2LevelGame
Col: Tournamentid, gameid,

Table 6: Bank
Fee, feetype, feedate, tournamentid
(fee is money player pays, fee date is the day in question)

shelbyoh
Starting Member

14 Posts

Posted - 2011-02-28 : 14:12:18
Are just created a view for reporting.

Look at joins or unions
Go to Top of Page
   

- Advertisement -