INSERT INTO `exat_form_reports` (`id`, `name`, `query`, `layout`, `compiled_query`, `compiled_layout`, `is_active`, `created_by`, `created_date`, `updated_by`, `updated_date`) VALUES ('NnmiZ5gq4NC2hvRCj', 'Students And Staffs From Same Birth Place', 'SELECT {{STAFF_DETAILS_FORM.Name}}, {{STAFF_DETAILS_FORM.Email}}, {{STAFF_DETAILS_FORM.Place Of Birth}},  {{STAFF_DETAILS_FORM.Select Gender}}, {{STAFF_DETAILS_FORM.Select Department}}, {{STUDENT_DETAILS_FORM.Name}}, {{STUDENT_DETAILS_FORM.Email}},  {{STUDENT_DETAILS_FORM.Place Of Birth}}, {{STUDENT_DETAILS_FORM.Select Gender}}, {{STUDENT_DETAILS_FORM.Select Department}} FROM [[STAFF_DETAILS_FORM]] INNER JOIN [[STUDENT_DETAILS_FORM]] ON {[STAFF_DETAILS_FORM.Place Of Birth]} = {[STUDENT_DETAILS_FORM.Place Of Birth]}', '{\"type\": \"simpleTableView\", \"columns\": [{\"alias\": \"Staff Name\", \"column\": \"STAFF_DETAILS_FORM.Name\"}, {\"alias\": \"Staff Email\", \"column\": \"STAFF_DETAILS_FORM.Email\"}, {\"alias\": \"Staff Gender\", \"column\": \"STAFF_DETAILS_FORM.Select Gender\"}, {\"alias\": \"Staff department\", \"column\": \"STAFF_DETAILS_FORM.Select Department\"}, {\"alias\": \"Staff Place Of Birth\", \"column\": \"STAFF_DETAILS_FORM.Place Of Birth\"}, {\"alias\": \"Student Name\", \"column\": \"STUDENT_DETAILS_FORM.Name\"}, {\"alias\": \"Student Email\", \"column\": \"STUDENT_DETAILS_FORM.Email\"}, {\"alias\": \"Student Gender\", \"column\": \"STUDENT_DETAILS_FORM.Select Gender\"}, {\"alias\": \"Student department\", \"column\": \"STUDENT_DETAILS_FORM.Select Department\"}, {\"alias\": \"Student Place Of Birth\", \"column\": \"STUDENT_DETAILS_FORM.Place Of Birth\"}]}', 'SELECT CONCAT(staff_details_form.id,student_details_form.id) as combined_id, staff_details_form.name as `staff_details_form.name`, staff_details_form.email as `staff_details_form.email`, staff_details_form.placeofbirth as `staff_details_form.placeofbirth`,  staff_details_form.selectgender as `staff_details_form.selectgender`, staff_details_form.selectdepartment as `staff_details_form.selectdepartment`, student_details_form.name as `student_details_form.name`, student_details_form.email as `student_details_form.email`,  student_details_form.placeofbirth as `student_details_form.placeofbirth`, student_details_form.selectgender as `student_details_form.selectgender`, student_details_form.selectdepartment as `student_details_form.selectdepartment` FROM staff_details_form INNER JOIN student_details_form ON staff_details_form.placeofbirth = student_details_form.placeofbirth', '{\"type\": \"simpleTableView\", \"headers\": [{\"key\": \"staff_details_form.name\", \"label\": \"Staff Name\"}, {\"key\": \"staff_details_form.email\", \"label\": \"Staff Email\"}, {\"key\": \"staff_details_form.selectgender\", \"label\": \"Staff Gender\"}, {\"key\": \"staff_details_form.selectdepartment\", \"label\": \"Staff department\"}, {\"key\": \"staff_details_form.placeofbirth\", \"label\": \"Staff Place Of Birth\"}, {\"key\": \"student_details_form.name\", \"label\": \"Student Name\"}, {\"key\": \"student_details_form.email\", \"label\": \"Student Email\"}, {\"key\": \"student_details_form.selectgender\", \"label\": \"Student Gender\"}, {\"key\": \"student_details_form.selectdepartment\", \"label\": \"Student department\"}, {\"key\": \"student_details_form.placeofbirth\", \"label\": \"Student Place Of Birth\"}]}', '1', '100', '2019-11-05 10:49:49', '100', '2019-11-05 10:49:49');
