superhit Posted October 17, 2012 Report Posted October 17, 2012 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 thank you
edisav_edava Posted October 17, 2012 Report Posted October 17, 2012 ikkada veyi...vachina vallu cheptharu
superhit Posted October 17, 2012 Author Report Posted October 17, 2012 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]
vikuba Posted October 17, 2012 Report Posted October 17, 2012 tables clear ga veyi...take pic and post it...please..or give source of the question
superhit Posted October 17, 2012 Author Report Posted October 17, 2012 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
vikuba Posted October 17, 2012 Report Posted October 17, 2012 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
cherlapalli_jailer Posted October 17, 2012 Report Posted October 17, 2012 solution akkada vunnadi kada bayya? Doubt emiti?
superhit Posted October 17, 2012 Author Report Posted October 17, 2012 [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
edisav_edava Posted October 17, 2012 Report Posted October 17, 2012 [quote name='cherlapalli_jailer' timestamp='1350507273' post='1302646321'] solution akkada vunnadi kada bayya? Doubt emiti? [/quote] ela vachido ardham kaledu emo
superhit Posted October 17, 2012 Author Report Posted October 17, 2012 [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
vikuba Posted October 17, 2012 Report Posted October 17, 2012 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
cherlapalli_jailer Posted October 17, 2012 Report Posted October 17, 2012 add group by function select , date,team1 , sum(score1) group by date, team, score1
superhit Posted October 17, 2012 Author Report Posted October 17, 2012 [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
Recommended Posts