このエラーを修正するにはどうすればよいですか? r.quartiere
を失うORA-00937:単一グループ・グループ機能ではありません。
select max(count(*))
from ristoranti r,prenotazioni p
where p.data <'14' and p.data >'3' and r.codice=p.ristorante
group by r.quartiere
このエラーを修正するにはどうすればよいですか? r.quartiere
を失うORA-00937:単一グループ・グループ機能ではありません。
select max(count(*))
from ristoranti r,prenotazioni p
where p.data <'14' and p.data >'3' and r.codice=p.ristorante
group by r.quartiere
あなたがmax(count(*))
を使用している場合は、r.quartiere
を選択することはできません(ただし、GROUP BYのままにします)、これは動作するはずです。
select max(count(*))
from ristoranti r,prenotazioni p
where p.data <'14' and p.data >'3' and r.codice=p.ristorante
group by r.quartiere;
これはどんな意味がありませんMAX(COUNT(*))
のお願いごとquartiere
select r.quartiere,max(count(*))
from ristoranti r,prenotazioni p
where p.data <'14'
and p.data >'3'
and r.codice=p.ristorante
group by r.quartiere
におけるカウントの選択最大氏は述べています。あなたは以下の
select r.quartiere, count(*)
from ristoranti r,
prenotazioni p
where p.data <'14' and
p.data >'3' and
r.codice=p.ristorante
group by r.quartiere
を実行する場合は、quartiere
ごとに1つの行を取得したいです。あなたが得るカウント値は、それぞれがquartiere
の最大カウントであるため、カウントは1つだけです。
これが役に立ちます。
あなたは二重集計を行っています。 – GurV
それは異なります。あなたは何をしようとしていましたか? – mathguy