Re: Dividing a count by another count
> I can't hard copy "Show Create Table"
Sure you can. Run the cmd in the mysql client program, terminate with with \G, copy the result, paste it here.
For your query, is this what you mean?
select round( avg(N), 1 ) as avg
from (
select a.code_matricule, count(e.code_emprunt) N
from abonne a
join emprunt e using(code_matricule)
group by code_matricule
) x;
Subject
Written By
Posted
September 01, 2020 04:27AM
Re: Dividing a count by another count
September 01, 2020 12:48PM
September 01, 2020 03:49PM
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.