1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Problem returning result

Discussion in 'MySQL' started by hugoscp, Feb 23, 2021.

  1. #1
    Hello,
    I have this query:

    select e.quantity, rl.quantity
    from logistics_inout.reception r
    left join logistics_inout.reception_line rl on
    rl.reception_id = r.id
    left join logistics_inout.reception_documents rd on
    r.id = rd.reception_id
    left join logistics_inout.document_line e on
    rd.documents_id = e.document_id
    where rl.reception_id = 5738
    and rl.product_id = 20992
    and e.product_id = 20992

    the result is:

    quantity quantity_1
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00
    16.00 1.00
    4.00 1.00


    And it should be:
    20 21

    The product code is just for testing the result, when it all goes well with the query i will remove it
    Please help me

    Thank you
     
    hugoscp, Feb 23, 2021 IP