-2
    select * from (
    select max(h.updated_datetime) as max, min(h.updated_datetime) as min from report r, report_history h, procedure_runtime_information PRI, study S
    where 
    h.report_fk=r.pk and
    r.study_fk=S.pk and
    PRI.pk=S.procedure_runtime_fk and
    extract(epoch from (max(h.updated_datetime) - min(h.updated_datetime) ) <=900 and
    h.pk IN (
    select pk from 
    (select * from report_history where report_fk=r.pk) as result
    )

  and r.status_fk =21 group by r.pk)as result1;

これは私のクエリです。構文エラーがあります。誰かがこれを修正するのを手伝ってくれますか?

4

1 に答える 1