kaostika

SQL help

Discussion created by kaostika on May 1, 2014
Latest reply on May 1, 2014 by beverly

I need to show the records like this, but I am not sure how to put in the SUM into this. I want to get a SUM of the last Column


Captain,2,2

Waiter,3,3

Bartender,2,2

Head Chef,1,2

Coat Check,6,1



This is what I have so far.


ExecuteSQL ( "




SELECT O.Role , R.Recommended , (A.ONE)

FROM R.Recommended AS R

JOIN Assigned AS A ON A.IDrole = R.IDrole

JOIN Roles AS O ON R.IDrole= O.IDrole

WHERE R.IDevent =?


ORDER BY O.Sort



" ; "" ; "" ; Events::IDevent)


It generates This. I need to combine the similar job into one line with the Second column and the Sum of the Last


Captain,2,1

Captain,2,1

Waiter,3,1

Waiter,3,1

Waiter,3,1

Bartender,2,1

Bartender,2,1

Head Chef,1,1

Head Chef,1,1

Coat Check,6,1


Oreste

Outcomes