DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Sql query

  1. #1
    Join Date
    Jan 2016
    Posts
    1

    Sql query

    Please help to assist write sql
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    I can see the output that you are looking for, however, I don't know the
    table structure and whether or not you need help with the first two queries
    or just the third. I will say that the third query requires a union all and an
    aggregate query.

    You should first union the two tables, then wrap that as a subquery and
    do a sum on the amount and net columns. Make sure that you order by name.

    At least that is the way I assume that your professor wants the query to be written...

Posting Permissions

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


Click Here to Expand Forum to Full Width