Results 1 to 7 of 7

Thread: SQL Query

  1. #1
    Punto Lover
    Join Date
    Sep 2007
    Location
    I
    Posts
    741

    SQL Query

    Right i'm ill with the Flu so not at class today so i'm just doing my work from home.

    Would anyone able to tell me how to make two calculations in the same query example to add a 3% bonus to a monthly Salary using the Annual salary. Would anyone be able to tweak this to help me.

    I have done the multiplication as 1.03 but now I need to divide it by 12 but im unsure as how to do this as it doesn't mention it in the notes

    SELECT [first name], surname, (salary * 1.03) AS Monthly_Wage
    FROM Workers
    WHERE town = "Bonnyrigg"

    Thank you very much if you can help.

  2. #2
    Punto Lover
    Join Date
    Sep 2007
    Location
    I
    Posts
    741
    doesn't matter figured it out myself lol can delete if you want

  3. #3
    Punto Lover
    Join Date
    Sep 2007
    Location
    I
    Posts
    741
    infact I have another problem I can't seem to round it to two decimal places here's what i've got so far, I'm aware of the round function but can't seem to get it to work correctly, anyone got any ideas? Please bare in mind im completely new to SQL.

    SELECT [first name], surname, (salary * 1.03) / 12 AS [Monthly Wage]
    FROM Workers

  4. #4
    Banned
    Join Date
    Jan 2006
    Location
    Staines
    Posts
    4,945
    Quote Originally Posted by Nod View Post
    infact I have another problem I can't seem to round it to two decimal places here's what i've got so far, I'm aware of the round function but can't seem to get it to work correctly, anyone got any ideas? Please bare in mind im completely new to SQL.

    SELECT [first name], surname, (salary * 1.03) / 12 AS [Monthly Wage]
    FROM Workers
    mate sql is horrible!!! if u wait till tonight i can give u the answer got it all written down, havent done any sql in bout 7 months haha.

  5. #5
    Punto Lover
    Join Date
    Sep 2007
    Location
    I
    Posts
    741
    Cool thanks.

  6. #6
    Punto Lover
    Join Date
    Jan 2008
    Location
    Sutton, surrey
    Posts
    1,485
    all sorted or not?

  7. #7
    Punto Lover
    Join Date
    Sep 2007
    Location
    I
    Posts
    741
    Yeah I have

    SELECT [first name], [surname], ROUND( ( ( [salary] * 1.03 ) / 12 ), 2 ) AS [Monthly Wage]
    FROM Workers

Similar Threads

  1. insurance query
    By phil_GT in forum Turbocharged Models Engine and Exhaust
    Replies: 4
    Last Post: 23rd September 2005, 13:44
  2. Suspension Query
    By matthuz in forum Wheels, Tyres, Suspension and Brakes
    Replies: 3
    Last Post: 12th July 2005, 12:23
  3. Samco Query
    By ChrisGT3 in forum Turbocharged Models Engine and Exhaust
    Replies: 3
    Last Post: 7th July 2005, 08:28
  4. Bonnet query
    By PuntoTD688 in forum Punto Chat
    Replies: 2
    Last Post: 13th August 2004, 11:04
  5. Camshaft query?
    By Puntonorthwales in forum Turbocharged Models Engine and Exhaust
    Replies: 1
    Last Post: 4th June 2004, 08:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •