Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
DECLARE @MaxComm decimal (3,2) SET @MaxComm = ( select max(CommissionPercentage) from tblCommissionTiers) SELECT DISTINCT empNum, gross as SALES ,targ.SalesTarget AS TARGET , lowPercentage,highPercentage, CommissionPercentage ,gross*lowPercentage AS LowAmount ,gross*highPercentage AS HighAmount ,(gross*highPercentage) - (gross*lowPercentage) VarHighVsLow ,CASE WHEN gross > targ.SalesTarget THEN ((gross*highPercentage) - (gross*lowPercentage)) * CommissionPercentage WHEN (gross - targ.SalesTarget) > 100.00 THEN (gross - targ.SalesTarget) * @MaxComm ELSE 0 END COMMISSION FROM tblRevenues rev INNER JOIN tblCommissionTiers com ON rev.commissionFlag = com.commissionFlag INNER JOIN [dbo].[tblTargets] Targ ON com.commissionFlag = targ.commissionFlag GROUP BY empNum, gross,targ.SalesTarget , lowPercentage ,highPercentage, CommissionPercentage
|What is the equivalent tool to SQL Server management studio would be for connecting to a progress/openedge database?||2||45|
|SQL Pivot with row total||5||27|
|Where on a calculated field||1||21|
|Comparison query - 4 columns||9||24|