Link to home
Start Free TrialLog in
Avatar of MK15
MK15

asked on

Count duplicate rows

Hi,

How can i get all the duplicate rows to display as a single figure.

select b.book_title, b.isbn, pb.new_price, p.payment_amount, count(pb.quantity)
    from purchased_books as pb inner join book_info as b on b.book_id = pb.book_id
    inner join payment as p on p.payment_id = pb.payment_id
    inner join customer as c on c.customer_id = pb.customer_id


User generated image
quantity should display 2 for isbn 1858818400 and 1 for isbn 067403063X


thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of johanntagle
johanntagle
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MK15
MK15

ASKER

thank you very much, it did the trick :)