Demo entry 6622988

consultas

   

Submitted by anonymous on Jun 06, 2017 at 21:45
Language: SQL. Code size: 14.5 kB.

-- http://panel.educacioncampeche.gob.mx/education/api/periods
SELECT `Period`.`id`, `Period`.`name`, `Period`.`short_name`, `Period`.`start_date`, `Period`.`end_date`, `Period`.`preenrollment_start_date`, `Period`.`preenrollment_end_date`, `Period`.`prev_period_id` FROM `wwweducaci_educa`.`periods` AS `Period` ORDER BY `Period`.`start_date` DESC;

-- http://panel.educacioncampeche.gob.mx/education/api/school_levels
SELECT `SchoolLevel`.`id`, `SchoolLevel`.`name` FROM `wwweducaci_educa`.`school_levels` AS `SchoolLevel` ORDER BY `SchoolLevel`.`order` ASC;

-- http://panel.educacioncampeche.gob.mx/education/api/school_types/{SchoolLevel.id}
SELECT `SchoolType`.`id`, `SchoolType`.`name`, `SchoolType`.`school_level_id`, `SchoolType`.`max_students_group`, `SchoolType`.`private`, `SchoolType`.`special`, `SchoolLevel`.`id`, `SchoolLevel`.`name` FROM `wwweducaci_educa`.`school_types` AS `SchoolType` LEFT JOIN `wwweducaci_educa`.`school_levels` AS `SchoolLevel` ON (`SchoolType`.`school_level_id` = `SchoolLevel`.`id`)  WHERE `SchoolType`.`school_level_id` = 3   ORDER BY `SchoolLevel`.`order` ASC, `SchoolType`.`name` ASC;

-- http://panel.educacioncampeche.gob.mx/education/api/school_grades/{SchoolLevel.id}
SELECT `SchoolGrade`.`id`, `SchoolGrade`.`name`, `SchoolGrade`.`text`, `SchoolGrade`.`school_level_id` FROM `wwweducaci_educa`.`school_grades` AS `SchoolGrade`   WHERE `SchoolGrade`.`school_level_id` = 3   ORDER BY `SchoolGrade`.`order` ASC

-- http://panel.educacioncampeche.gob.mx/education/api/school_shifts
SELECT `ShiftOption`.`key`, `ShiftOption`.`name`, `SchoolShiftsShiftOption`.`id`, `SchoolShiftsShiftOption`.`school_shift_id`, `SchoolShiftsShiftOption`.`shift_option_id`, `SchoolShiftsShiftOption`.`created`, `SchoolShiftsShiftOption`.`modified` FROM `wwweducaci_educa`.`shift_options` AS `ShiftOption` JOIN `wwweducaci_educa`.`school_shifts_shift_options` AS `SchoolShiftsShiftOption` ON (`SchoolShiftsShiftOption`.`school_shift_id` IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) AND `SchoolShiftsShiftOption`.`shift_option_id` = `ShiftOption`.`id`);

-- http://panel.educacioncampeche.gob.mx/education/api/school_zones
SELECT `SchoolZone`.`id`, `SchoolZone`.`key`, `SchoolZone`.`zone`, `SchoolZone`.`name`, `SchoolZone`.`supervisor_id` FROM `wwweducaci_educa`.`school_zones` AS `SchoolZone`  ORDER BY `SchoolZone`.`id` ASC;

-- http://panel.educacioncampeche.gob.mx/education/api/schools/{Period.id}
SELECT `School`.`id`, `School`.`key`, `School`.`name`, `School`.`school_level_id`, `School`.`school_type_id`, `School`.`school_shift_id`, `School`.`school_zone_id`, `School`.`locality_id`, `School`.`municipality_id`, `School`.`zone_id`, `School`.`country_id`, `School`.`address_street`, `School`.`address_internal_number`, `School`.`address_external_number`, `School`.`address_neighborhood`, `School`.`address_zip_code`, `School`.`phone_number`, `School`.`latitude`, `School`.`longitude`, `School`.`principal_id`, (`EnrollmentSchool`.`max_groups`) AS  `School__max_groups` FROM `wwweducaci_educa`.`schools` AS `School` JOIN `wwweducaci_educa`.`enrollment_schools` AS `EnrollmentSchool` ON (`EnrollmentSchool`.`period_id` = '3' AND `EnrollmentSchool`.`school_id` = `School`.`id`)  WHERE `School`.`special_cases` = '0'    LIMIT 100;

-- http://panel.educacioncampeche.gob.mx/education/api/schools/3?locality_id=14895&school_level_id=3&name=BRAVO
SELECT `School`.`id`, `School`.`key`, `School`.`name`, `School`.`school_level_id`, `School`.`school_type_id`, `School`.`school_shift_id`, `School`.`school_zone_id`, `School`.`locality_id`, `School`.`municipality_id`, `School`.`zone_id`, `School`.`country_id`, `School`.`address_street`, `School`.`address_internal_number`, `School`.`address_external_number`, `School`.`address_neighborhood`, `School`.`address_zip_code`, `School`.`phone_number`, `School`.`latitude`, `School`.`longitude`, `School`.`principal_id`, (`EnrollmentSchool`.`max_groups`) AS  `School__max_groups` FROM `wwweducaci_educa`.`schools` AS `School` JOIN `wwweducaci_educa`.`enrollment_schools` AS `EnrollmentSchool` ON (`EnrollmentSchool`.`period_id` = '3' AND `EnrollmentSchool`.`school_id` = `School`.`id`)  WHERE `School`.`special_cases` = '0' AND `School`.`school_level_id` = 3 AND `School`.`locality_id` = 14895 AND `School`.`name` LIKE '%BRAVO%'    LIMIT 100;

-- http://panel.educacioncampeche.gob.mx/education/api/school/3/109
SELECT `School`.`id`, `School`.`key`, `School`.`name`, `School`.`school_level_id`, `School`.`school_type_id`, `School`.`school_shift_id`, `School`.`locality_id`, `School`.`municipality_id`, `School`.`zone_id`, `School`.`country_id`, `School`.`address_street`, `School`.`address_internal_number`, `School`.`address_external_number`, `School`.`address_neighborhood`, `School`.`address_zip_code`, `School`.`phone_number`, `School`.`latitude`, `School`.`longitude`, `School`.`principal_id`, (`EnrollmentSchool`.`max_groups`) AS  `School__max_groups` FROM `wwweducaci_educa`.`schools` AS `School` JOIN `wwweducaci_educa`.`enrollment_schools` AS `EnrollmentSchool` ON (`EnrollmentSchool`.`period_id` = '3' AND `EnrollmentSchool`.`school_id` = `School`.`id`)  WHERE `School`.`id` = 109    LIMIT 1;

-- http://panel.educacioncampeche.gob.mx/education/api/countries
SELECT `Country`.`id`, `Country`.`key`, `Country`.`name`, `Country`.`region` FROM `wwweducaci_seduc`.`countries` AS `Country` ORDER BY `Country`.`name` ASC;

-- http://panel.educacioncampeche.gob.mx/education/api/zones
SELECT `Zone`.`id`, `Zone`.`key`, `Zone`.`name`, `Zone`.`short_name`, `Zone`.`country_id` FROM `wwweducaci_seduc`.`zones` AS `Zone` ORDER BY `Zone`.`name` ASC;

-- http://panel.educacioncampeche.gob.mx/education/api/municipalities/{Zone.id}
SELECT `Municipality`.`id`, `Municipality`.`key`, `Municipality`.`name`, `Municipality`.`zone_id`, `Municipality`.`country_id` FROM `wwweducaci_seduc`.`municipalities` AS `Municipality`   WHERE `Municipality`.`zone_id` = 4   ORDER BY `Municipality`.`name` ASC;

-- http://panel.educacioncampeche.gob.mx/education/api/localities/{Municipality.id}
SELECT `Locality`.`id`, `Locality`.`key`, `Locality`.`name`, `Locality`.`municipality_id`, `Locality`.`zone_id`, `Locality`.`country_id` FROM `wwweducaci_seduc`.`localities` AS `Locality`   WHERE `Locality`.`municipality_id` = 120   ORDER BY `Locality`.`name` ASC;

-- http://panel.educacioncampeche.gob.mx/education/api/languages
SELECT `Language`.`id`, `Language`.`name`, `Language`.`main` FROM `wwweducaci_educa`.`languages` AS `Language` ORDER BY `Language`.`name` ASC;

-- http://panel.educacioncampeche.gob.mx/education/api/native_languages
SELECT `NativeLanguage`.`id`, `NativeLanguage`.`name`, `NativeLanguage`.`main` FROM `wwweducaci_educa`.`native_languages` AS `NativeLanguage` ORDER BY `NativeLanguage`.`name` ASC;

-- http://panel.educacioncampeche.gob.mx/education/api/special_needs
SELECT `SpecialNeed`.`id`, `SpecialNeed`.`key`, `SpecialNeed`.`name` FROM `wwweducaci_educa`.`special_needs` AS `SpecialNeed` ORDER BY `SpecialNeed`.`name` ASC;

-- http://panel.educacioncampeche.gob.mx/education/api/enrolled/{Period.id}/{School.id}/{Student.curp}
SELECT `Enrollment`.`id`, `Enrollment`.`enrollment_group_id`, `Enrollment`.`period_id`, `Enrollment`.`school_id`, `Enrollment`.`school_grade_id`, `Enrollment`.`shift`, `Enrollment`.`group`, `Enrollment`.`no_document`, `Enrollment`.`weight`, `Enrollment`.`stature`, `Enrollment`.`student_id`, `Enrollment`.`status`, `Enrollment`.`reason_id`, `Enrollment`.`valid`, `Enrollment`.`age_valid`, `Enrollment`.`has_scores`, `Enrollment`.`approved`, `Enrollment`.`duplicated`, `Enrollment`.`egc_available`, `Enrollment`.`temporal`, `Enrollment`.`registrar`, `Enrollment`.`registrar_name`, `Enrollment`.`registrar_paternal_surname`, `Enrollment`.`registrar_maternal_surname`, `Enrollment`.`created`, `Enrollment`.`modified`, `Enrollment`.`aided`, `Enrollment`.`receives_aid`, `Enrollment`.`type`, `Enrollment`.`outstanding_document`, `Enrollment`.`no_record`, `Enrollment`.`auto_enroll`, `Enrollment`.`old_record`, `Enrollment`.`shoe_size`, `Enrollment`.`shirt_size`, `Student`.`id`, `Student`.`curp`, `Student`.`name`, `Student`.`paternal_surname`, `Student`.`maternal_surname`, `Student`.`gender`, `Student`.`birthday`, `Student`.`is_foreign`, `Student`.`birth_country_id`, `Student`.`birth_zone_id`, `Student`.`birth_municipality_id`, `Student`.`address_street`, `Student`.`address_internal_number`, `Student`.`address_external_number`, `Student`.`address_neighborhood`, `Student`.`address_zone_id`, `Student`.`address_municipality_id`, `Student`.`address_locality_id`, `Student`.`address_zip_code`, `Student`.`address_phone_number`, `Student`.`speaks_spanish`, `Student`.`other_native_languages`, `Student`.`special_needs`, `Student`.`special_need_description`, `Student`.`blood_type_group`, `Student`.`blood_type_rh`, `Student`.`preferred_sport`, `Student`.`preferred_cultural_activity`, `Student`.`processed`, `Student`.`created`, `Student`.`modified`, `Student`.`data_validated`, `Student`.`curp_validated`, `Student`.`background_check`, `Student`.`handedness`, `Student`.`alergies`, `Student`.`conditions`, `Student`.`cam`, `Student`.`usaer`, `Student`.`capep`, `Student`.`custody`, `Student`.`social_security`, `Student`.`external_id`, (CONCAT(`Student`.`paternal_surname`, ' ', `Student`.`maternal_surname`,', ',`Student`.`name`)) AS  `Student__display_name` FROM `wwweducaci_educa`.`enrollments` AS `Enrollment` LEFT JOIN `wwweducaci_educa`.`students` AS `Student` ON (`Enrollment`.`student_id` = `Student`.`id`)  WHERE `Enrollment`.`period_id` = 3 AND `Enrollment`.`school_id` = 3931 AND `Enrollment`.`status` <> 'Baja' AND `Enrollment`.`valid` = '1' AND `Student`.`curp` = 'PICK090719MCCNMSA7' LIMIT 1;

-- http://panel.educacioncampeche.gob.mx/education/api/student/{Student.curp}
SELECT `BirthCountry`.`id`, `BirthCountry`.`key`, `BirthCountry`.`name`, `BirthCountry`.`region` FROM `wwweducaci_seduc`.`countries` AS `BirthCountry`   WHERE `BirthCountry`.`id` = 157;
SELECT `BirthZone`.`id`, `BirthZone`.`key`, `BirthZone`.`name`, `BirthZone`.`short_name`, `BirthZone`.`country_id` FROM `wwweducaci_seduc`.`zones` AS `BirthZone`   WHERE `BirthZone`.`id` = 4;
SELECT `BirthMunicipality`.`id`, `BirthMunicipality`.`key`, `BirthMunicipality`.`name`, `BirthMunicipality`.`zone_id`, `BirthMunicipality`.`country_id` FROM `wwweducaci_seduc`.`municipalities` AS `BirthMunicipality`   WHERE `BirthMunicipality`.`id` = 24;
SELECT `AddressZone`.`id`, `AddressZone`.`key`, `AddressZone`.`name`, `AddressZone`.`short_name`, `AddressZone`.`country_id` FROM `wwweducaci_seduc`.`zones` AS `AddressZone`   WHERE `AddressZone`.`id` = 4
SELECT `AddressMunicipality`.`id`, `AddressMunicipality`.`key`, `AddressMunicipality`.`name`, `AddressMunicipality`.`zone_id`, `AddressMunicipality`.`country_id` FROM `wwweducaci_seduc`.`municipalities` AS `AddressMunicipality`   WHERE `AddressMunicipality`.`id` = 24;
SELECT `AddressLocality`.`id`, `AddressLocality`.`key`, `AddressLocality`.`name`, `AddressLocality`.`municipality_id`, `AddressLocality`.`zone_id`, `AddressLocality`.`country_id` FROM `wwweducaci_seduc`.`localities` AS `AddressLocality`   WHERE `AddressLocality`.`id` = 15530;
SELECT `Student`.`curp`, `Student`.`name`, `Student`.`gender`, `Student`.`birthday`, `Student`.`handedness`, `Student`.`birth_country_id`, `Student`.`birth_zone_id`, `Student`.`birth_municipality_id`, `Student`.`address_street`, `Student`.`address_external_number`, `Student`.`address_internal_number`, `Student`.`address_neighborhood`, `Student`.`address_zip_code`, `Student`.`address_phone_number`, `Student`.`address_zone_id`, `Student`.`address_municipality_id`, `Student`.`address_locality_id`, `Student`.`custody`, `Student`.`speaks_spanish`, `Student`.`special_needs`, `Student`.`special_need_description`, `Student`.`cam`, `Student`.`usaer`, `Student`.`capep`, `Student`.`social_security`, `Student`.`blood_type_group`, `Student`.`blood_type_rh`, `Student`.`alergies`, `Student`.`conditions`, `Student`.`preferred_sport`, `Student`.`preferred_cultural_activity`, `Student`.`id`, (`Student`.`paternal_surname`) AS  `Student__first_surname`, (`Student`.`maternal_surname`) AS  `Student__second_surname` FROM `wwweducaci_educa`.`students` AS `Student`   WHERE `Student`.`curp` = 'HESZ090706MCCRTLA9'  GROUP BY `Student`.`id`   LIMIT 1;
SELECT `Relative`.`relationship`, `Relative`.`name`, `Relative`.`curp`, `Relative`.`birthday`, `Relative`.`civil_status`, `Relative`.`telephone`, `Relative`.`mobile_phone`, `Relative`.`email`, `Relative`.`education_level`, `Relative`.`education_grade`, `Relative`.`education_finished`, `Relative`.`education_area`, `Relative`.`works`, `Relative`.`occupation`, `Relative`.`same_address_as_student`, `Relative`.`address_street`, `Relative`.`address_external_number`, `Relative`.`address_internal_number`, `Relative`.`address_neighborhood`, `Relative`.`address_zip_code`, `Relative`.`address_zone_id`, `Relative`.`address_municipality_id`, `Relative`.`address_locality_id`, (`Relative`.`paternal_surname`) AS  `Relative__first_surname`, (`Relative`.`maternal_surname`) AS  `Relative__second_surname`, `Relative`.`student_id` FROM `wwweducaci_educa`.`relatives` AS `Relative`   WHERE `Relative`.`student_id` = (4);
SELECT `SpecialNeed`.`id`, `SpecialNeed`.`key`, `SpecialNeed`.`name`, `SpecialNeedsStudent`.`id`, `SpecialNeedsStudent`.`special_need_id`, `SpecialNeedsStudent`.`student_id` FROM `wwweducaci_educa`.`special_needs` AS `SpecialNeed` JOIN `wwweducaci_educa`.`special_needs_students` AS `SpecialNeedsStudent` ON (`SpecialNeedsStudent`.`student_id` = 4 AND `SpecialNeedsStudent`.`special_need_id` = `SpecialNeed`.`id`);
SELECT `Language`.`id`, `Language`.`name`, `Language`.`main`, `LanguagesStudent`.`id`, `LanguagesStudent`.`student_id`, `LanguagesStudent`.`language_id` FROM `wwweducaci_educa`.`languages` AS `Language` JOIN `wwweducaci_educa`.`languages_students` AS `LanguagesStudent` ON (`LanguagesStudent`.`student_id` = 4 AND `LanguagesStudent`.`language_id` = `Language`.`id`);
SELECT `NativeLanguage`.`id`, `NativeLanguage`.`name`, `NativeLanguage`.`main`, `NativeLanguagesStudent`.`id`, `NativeLanguagesStudent`.`student_id`, `NativeLanguagesStudent`.`native_language_id` FROM `wwweducaci_educa`.`native_languages` AS `NativeLanguage` JOIN `wwweducaci_educa`.`native_languages_students` AS `NativeLanguagesStudent` ON (`NativeLanguagesStudent`.`student_id` = 4 AND `NativeLanguagesStudent`.`native_language_id` = `NativeLanguage`.`id

This snippet took 0.02 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).