MySQL Forums
Forum List  »  Newbie

Dividing a count by another count
Posted by: Adelie Saunier
Date: August 31, 2020 06:27PM

Hi everyone, I'm working on a library database, and I need to find the average amount of books borrowed by the customers. I'm trying to do something like :

count(AMOUNT OF BOOKS LOANS) divided by count (AMOUNT OF CUSTOMERS )

I know I could simply

SELECT (AMOUNT OF BOOK LOANS ) DIV ( AMOUNT OF CUSTOMERS)

but i need to write it in one query, can someone help me ?

Options: ReplyQuote


Subject
Written By
Posted
Dividing a count by another count
August 31, 2020 06:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.