您好,我正在编写一个SQL
从多个表中获取数据并从结果集中检索数据的查询,我们需要rs.getString(1)
从相应的表中进行操作,但对我而言,数据来自多个表。
你能告诉我怎么做吗?
为了便于参考,我将我的SQL
查询包括在内
select EID,sport,emich_email, lastname,firstname,numtodsinterval(sum(
extract(day from dd) * (24 * 60 * 60)
+ extract(hour from dd) * (60 * 60)
+ extract(minute from dd) * 60
+ extract(second from dd)
), 'SECOND') as total_hours
from (
select scans.emich_email,EID,lastname,firstname,Sport, sign_out - sign_in as dd from scans INNER JOIN student_details ON scans.emich_email=student_details.emich_email INNER JOIN Athlete ON student_details.EID=Athlete.EID)
group by emich_email,EID,lastname,firstname,sport;