Γράψτε κάποιο Λογισμικό

  • Status: Closed
  • Prize: $10
  • Entries Received: 9

Contest Brief

We need someone with strong technical skills in Oracle PLSQL for this work.

We have 2 tables in Toad for Oracle.

The 1st table (offices) contains: officeid (number - 4), office (varchar2 - 100)

The 2nd table (transactions) contains: transid (number - 18), officeid (number - 4), transdate (date of transaction), credit (number – 18,2), debit (number – 18,2)

We need to run a query (with select statement) in SQL to do the following:

For each office, we need to see, firstly, the current month, the balance of the previous month, the total credits of the current month, the total debits for the current month and the new balance of the current month.

Recommended Skills

Top entries from this contest

View More Entries

Public Clarification Board

  • shopshoppy
    shopshoppy
    • 7 months ago

    can we discuss

    • 7 months ago
  • asif2478
    asif2478
    • 7 months ago

    #increaseprize

    • 7 months ago
  • Nawaf2020th
    Nawaf2020th
    • 7 months ago

    with trans as
    (select t1.officeid,
    sum(CASE
    when TO_CHAR(t1.TRANSDATE,'Month,yyyy') = TO_CHAR(ADD_MONTHS(sysdate, -1),'Month,yyyy') then
    (t1.DEBIT - t1.credit)
    else
    0
    end) bal_prev_m,
    sum(CASE
    when TO_CHAR(t1.TRANSDATE,'Month,yyyy') = TO_CHAR(sysdate,'Month,yyyy') then
    t1.credit
    else
    0
    end) tot_credits_m,
    sum(CASE
    when TO_CHAR(t1.TRANSDATE, 'Month,yyyy') = TO_CHAR(sysdate,'Month,yyyy') then
    t1.DEBIT
    else
    0
    end) total_debits_m,
    sum(CASE
    when TO_CHAR(t1.TRANSDATE,'Month,yyyy') = TO_CHAR(sysdate,'Month,yyyy') then
    (t1.DEBIT - t1.credit)
    else
    0
    end) bal_currt_m
    from TRANSACTIONS t1
    group by officeid)
    select o.office,TO_CHAR(sysdate,'Month') current_month,
    bal_prev_m,tot_credits_m,
    total_debits_m,bal_currt_m
    from OFFICES o, trans t
    where o.officeid = t.officeid
    order by o.office;

    • 7 months ago

How to get started with contests

  • Post your contest

    Post Your Contest Quick and easy

  • Get tons of entries

    Get Tons of Entries From around the world

  • Award the best entry

    Award the best entry Download the files - Easy!

Post a Contest Now or Join us Today!