Find Jobs
Hire Freelancers

Calculate columns value in sql server query

$3-8 USD

Completed
Posted almost 13 years ago

$3-8 USD

Paid on delivery
it is an add-on task to calculate totalpracticalavg, totalpracticalpct, totaltheorypct, moduletotalresult with the sql query below: some of the lines have been made up from statement rather than coding task could be done remotely, prefer session start at 9:30pm kuala lumpur time select *, totalattendancepct = (CASE WHEN totalattendance <> 0 then astatusontime * 10 / totalattendance ELSE 0 END), totalpracticalavg = (fpractical1 + fpractical2 + fpractical3 + fpractical4 + fpractical5) / COUNT(IS NOT NULL(5 practicals) ), totalpracticalpct = (totalpracticalavg * 60 ) / 100, totaltheorypct = IS NOT NULL (ftheory * 30) / 100 , moduletotalresult = totalattendancepct + totalpracticalpct + totaltheorypct from ( Select [login to view URL] as fpractical1, [login to view URL] as fpractical2,[login to view URL] as fpractical3, [login to view URL] as fpractical4, [login to view URL] as fpractical5, [login to view URL] as ftheory1, [login to view URL] as evaluation1, [login to view URL] as evaluation2, [login to view URL] as fpaper, [login to view URL] as modulefinalresult, [login to view URL] as modulename, [login to view URL] as moduleid, [login to view URL] as duration, [login to view URL] as briefdesc, [login to view URL] as pimage, [login to view URL] as studentname, (select COUNT(attendancestatus) FROM StudentAttendance sa INNER JOIN TraineeModule tm ON [login to view URL] = [login to view URL] WHERE [login to view URL] = 1 AND sa.attendancestatus='ontime' AND [login to view URL] = [login to view URL]) as astatusontime, (select COUNT(attendancestatus) FROM StudentAttendance sa INNER JOIN TraineeModule tm ON [login to view URL] = [login to view URL] WHERE [login to view URL] = 1 AND (sa.attendancestatus='late' OR [login to view URL] ='absense') AND [login to view URL] = [login to view URL]) as astatuslateabsense, (select COUNT(attendancestatus) FROM StudentAttendance sa INNER JOIN TraineeModule tm ON [login to view URL] = [login to view URL] WHERE [login to view URL] = 1 AND [login to view URL] = [login to view URL]) as totalattendance from StudentResult sr INNER JOIN Module m ON [login to view URL] = [login to view URL] INNER JOIN Student s ON [login to view URL] = [login to view URL] INNER JOIN UserTable ut ON [login to view URL] = [login to view URL] WHERE [login to view URL] = 1 ) TAB1
Project ID: 3412007

About the project

1 proposal
Remote project
Active 13 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$5 USD in 1 day
4.8 (13 reviews)
3.8
3.8

About the client

Flag of MALAYSIA
Malaysia
5.0
65
Payment method verified
Member since Aug 30, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.