Monday, July 9

Query bagi mengira perbezaan antara dua masa

SELECT
surgery.patient_id,
ref_drug.drug AS ListDrug,
ref_discipline.discipline AS displin,
surgery.surgery_start_time,
surgery.surgery_end_time,
format(((time_to_sec(surgery.surgery_start_time) - time_to_sec(surgery.surgery_end_time)) / 60),0) AS `minit`
FROM
surgery
INNER JOIN surgeon_note ON surgery.surgery_id = surgeon_note.surgery_id
INNER JOIN ref_drug ON surgeon_note.drug_id = ref_drug.drug_id
INNER JOIN ref_discipline ON surgery.discipline_id = ref_discipline.discipline_id

No comments:

Post a Comment

Featured Post

BAGAIMANA BERURUSAN CIRI-CIRI KESELAMATAN GITULAH