我写了一个查询,我只是从多个表中选择不同的列。我正在学习 Django rest apis,我想编写一个 api,将查询中的数据插入到我的自定义转储表中。如果您能简短地回答我的问题,将不胜感激。这是我的查询。
query= """ select pa.height, pa.weight, pa.muac, pa.tsf, pa.bmi, pa.nutritionist_comment,
pa.create_date_app_side, hp.gender, hp.name, hp.regn_date_hospital, hp.dob,
hp.city, hp.diagnosis_list_id, hp.diagnosis_stage, hg.first_name,
hg.phone_number, hg.preferred_language_id
from patientcounselling_anthropometric as pa
join hospital_patient as hp on hp.uuid=pa.patient_uuid
join hospital_guardian hg on hg.patient_uuid=hp.uuid """