CREATE TABLE s3_marksheet AS SELECT s.id, s.first_name, s.last_name, math.math AS math, english.eng AS english, physics.phy AS physics, biology.bio AS biology, chemistry.chem AS chemistry, geography.geo AS geography, history.hist AS history, cre.cre AS cre, lug.lug AS lug, kisw.kisw AS kiswahili, lit.lit AS lit, art.art AS art, td.td AS td, ict.ict AS ict, agric.agric AS agriculture, ent.ent AS ent FROM s3_students s LEFT JOIN s3_math_marks math ON s.id = math.id LEFT JOIN s3_eng_marks eng ON s.id = english.id LEFT JOIN s3_phy_marks phy ON s.id = physics.id LEFT JOIN s3_bio_marks bio ON s.id = biology.id LEFT JOIN s3_chem_marks chem ON s.id = chemistry.id LEFT JOIN s3_geo geo ON s.id = geography.id LEFT JOIN s3_hist_marks hist ON s.id = history.id LEFT JOIN s3_cre_marks cre ON s.id = cre.id LEFT JOIN s3_lug_marks lug ON s.id = lug.id LEFT JOIN s3_kisw_marks kisw ON s.id = kisw.id LEFT JOIN s3_lit_marks lit ON s.id = lit.id LEFT JOIN s3_art_marks art ON s.id = art.id LEFT JOIN s3_td_marks td ON s.id = td.id LEFT JOIN s3_ict_marks ict ON s.id = ict.id LEFT JOIN s3_agric_marks agric ON s.id = agric.id LEFT JOIN s3_ent_marks ent ON s.id = ent.id;