Jump to content

Sql Joins...looking For Help


Recommended Posts

Posted

Hi All,

SQL JOINs nerchukuntunnanu. mana db vaallu ichchina website loki velli examples practice chesthunnanu. anudlo vokati yentha try chesina naaku raavattledu.
yevarina vunte questions ku answer (query) cheppagalaraaa? or anyone up for combined studies :D

thank you

  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

  • superhit

    13

  • lolliman

    5

  • vikuba

    4

  • padmasri123

    4

Top Posters In This Topic

Posted

question daalo raja

Posted

game id mdate stadium team1 team2 1001 8 June 2012 National Stadium, Warsaw POL GRE 1002 8 June 2012 Stadion Miejski (Wroclaw) RUS CZE 1003 12 June 2012 Stadion Miejski (Wroclaw) GRE CZE 1004 12 June 2012 National Stadium, Warsaw POL RUS ...

goal matchid teamid player gtime 1001 POL Robert Lewandowski 17 1001 GRE Dimitris Salpingidis 51 1002 RUS Alan Dzagoev 15 1001 RUS Roman Pavlyuchenko 82 ...

Above are two tables. Question: [color=#b22222][b]List every match with the goals scored by each team as shown in the below output table: [/b][/color]
mdate team1 score1 team2 score2 1 July 2012 ESP 4 ITA 0 10 June 2012 ESP 1 ITA 1 10 June 2012 IRL 1 CRO 3 ...
[b] [size=3][font=arial, helvetica, sans-serif]Can someone plz try to answer?[/font][/size][/b]

Posted

tables clear ga veyi...take pic and post it...please..or give source of the question

Posted

Tables copy pase chesaanu, but formatting yegiripoyindi. Office lo vunnaanu, so can't insert any images/gifs. Here is the source BAa...

The tables are given in the website [url="http://sqlzoo.net/wiki/The_JOIN_operation"]http://sqlzoo.net/wi..._JOIN_operation[/url]
Please try to answer Question# 13

:)

Posted

gameid mdate stadium team1 team2
1001 8 June 2012 National Stadium, Warsaw POL GRE
1002 8 June 2012 Stadion Miejski (Wroclaw) RUS CZE
1003 12 June 2012 Stadion Miejski (Wroclaw)GRE CZE
1004 12 June 2012 National Stadium, Warsaw POL RUS ...

goalmatchid teamid player gtime
1001 POL Robert Lewandowski 17
1001 GRE Dimitris Salpingidis 51
1002 RUS Alan Dzagoev 15
1001 RUS Roman Pavlyuchenko 82

tables are like this i think

Posted

solution akkada vunnadi kada bayya?

Doubt emiti?

Posted

[quote name='Aamphat' timestamp='1350507203' post='1302646314']
gameid mdate stadium team1 team2
1001 8 June 2012 National Stadium, Warsaw POL GRE
1002 8 June 2012 Stadion Miejski (Wroclaw) RUS CZE
1003 12 June 2012 Stadion Miejski (Wroclaw)GRE CZE
1004 12 June 2012 National Stadium, Warsaw POL RUS ...

goalmatchid teamid player gtime
1001 POL Robert Lewandowski 17
1001 GRE Dimitris Salpingidis 51
1002 RUS Alan Dzagoev 15
1001 RUS Roman Pavlyuchenko 82

tables are like this i think
[/quote]

Ya, that's how tables are

Posted

[quote name='cherlapalli_jailer' timestamp='1350507273' post='1302646321']
solution akkada vunnadi kada bayya?

Doubt emiti?
[/quote]

ela vachido ardham kaledu emo

Posted

[quote name='cherlapalli_jailer' timestamp='1350507273' post='1302646321']
solution akkada vunnadi kada bayya?

Doubt emiti?
[/quote]

Solution (query) vaadu ivvaledu. Vaadu aa site lo ichchina query is not the answer for question...adi matter

Posted

office lo sqlzoo not allowed for me..but let me throw a focus on the problem.
rend tables common ga unna column is team1 and team id
or game id and goal match id.

join two tables on a.gameid = b.goalmatchid
and select only team id and gtimes.

then based on that group by team id, goal matchid

Posted

add group by function

select , date,team1 , sum(score1)

group by date, team, score1

Posted

[quote name='Aamphat' timestamp='1350507496' post='1302646349']
office lo sqlzoo not allowed for me..but let me throw a focus on the problem.
rend tables common ga unna column is team1 and team id
or game id and goal match id.

join two tables on a.gameid = b.goalmatchid
and select only team id and gtimes.

then based on that group by team id, goal matchid
[/quote]

Output yelaa vundaaali ante, prathi match lo ye team yenni goals chesindo count raavaaali.

cha, Just now my office ppl blocked this site

×
×
  • Create New...