nikhilboorla Posted October 14, 2014 Report Posted October 14, 2014 i have one table with 2 rows empid and salary. empid salary -------- -------- 1 1000 1 3000 2 8000 3 4000 4 7000 now i want to get output like empid salary --------- -------- 1 4000 (1000+3000) 2 8000 3 4000 4 7000 can i use inner joins concept?if not which concept i can use?
pythonic Posted October 14, 2014 Report Posted October 14, 2014 select empid, sum(salary) from <table_name> group by empid;
Osama Bin Gandhi Posted October 14, 2014 Report Posted October 14, 2014 select empid, sum(salary) from <table_name> group by empid;
arshad Posted October 14, 2014 Report Posted October 14, 2014 i have one table with 2 rows empid and salary. empid salary -------- -------- 1 1000 1 3000 2 8000 3 4000 4 7000 now i want to get output like empid salary --------- -------- 1 4000 (1000+3000) 2 8000 3 4000 4 7000 can i use inner joins concept?if not which concept i can use? Deeniki inner join enduku ra ayya... Asalu Join eppudu use chestaro telusaa?? Simple ga select Empid,Sum(salary) from table group by empid; tho poye daniki join enduku Raja??
Hyderabad_Nawab Posted October 14, 2014 Report Posted October 14, 2014 select empid, sum(salary) from <table_name> group by empid; +1....:)
former Posted October 14, 2014 Report Posted October 14, 2014 i have one table with 2 rows empid and salary. empid salary -------- -------- 1 1000 1 3000 2 8000 3 4000 4 7000 now i want to get output like empid salary --------- -------- 1 4000 (1000+3000) 2 8000 3 4000 4 7000 can i use inner joins concept?if not which concept i can use? Idi sql basic bhayya. Simple ga aggregation cheyi pyna cheppi nattu ....
raj9002 Posted October 14, 2014 Report Posted October 14, 2014 Nak okati ardam kaleduu.... Akkada EMP ID anedii primary key aiteyy duplicate values ela vachayii...///
DaleSteyn1 Posted October 14, 2014 Report Posted October 14, 2014 i have one table with 2 rows empid and salary. empid salary -------- -------- 1 1000 1 3000 2 8000 3 4000 4 7000 now i want to get output like empid salary --------- -------- 1 4000 (1000+3000) 2 8000 3 4000 4 7000 can i use inner joins concept?if not which concept i can use? first thing row ki column ki difference telsko.Sum function with groupby vaadu result ochesthadhi
pythonic Posted October 14, 2014 Report Posted October 14, 2014 Nak okati ardam kaleduu.... Akkada EMP ID anedii primary key aiteyy duplicate values ela vachayii.../// ayina primary key ekkada mention cheyaledu kada man...
DaleSteyn1 Posted October 14, 2014 Report Posted October 14, 2014 Nak okati ardam kaleduu.... Akkada EMP ID anedii primary key aiteyy duplicate values ela vachayii...// id ante default ga pk ani assume chesukunattunav
BC509 Posted October 14, 2014 Report Posted October 14, 2014 Nak okati ardam kaleduu.... Akkada EMP ID anedii primary key aiteyy duplicate values ela vachayii.../// sp_help yourtablename execute chesi result pampu .. primary key define iyyindo ledo telustundi ..
raj9002 Posted October 15, 2014 Report Posted October 15, 2014 ayina primary key ekkada mention cheyaledu kada man... Mention cheyaleduu dude... but logical ga chusteyy EMPLOYEE_ID is primary key, i dont think same EMP_ID is assigned to multiple employees
Recommended Posts