Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Employee #3

Open
goku-1995 opened this issue Apr 30, 2024 · 0 comments
Open

Employee #3

goku-1995 opened this issue Apr 30, 2024 · 0 comments

Comments

@goku-1995
Copy link

select *,(
CASE
WHEN gender = 1 THEN 'MALE'
WHEN gender = 2 THEN 'FEMALE'
END
) as 'gender' from ems_profile;
select *, (select name from core_administrative_unit where id = ems_profile.organization_unit ) from ems_profile where blood_group = "A+";

Select * from ems_profile where blood_group = 'A+' and gender = '2';
Select * from ems_profile where blood_group = 'A+' and gender = '2' and qualification = 'Post-Graduate';
select count(id) from ems_profile where blood_group = 'A+';
select count(id) from ems_profile where blood_group = 'A+' and gender = '2';
select * from ems_profile where nature_of_employment = 'adhoc' or nature_of_employment = 'contractual';
select * from ems_profile;
select ems_profile.id,
ems_profile.title, ems_profile.first_name, ems_profile.middle_name,
ems_profile.last_name, ems_profile.name_in_hindi, ems_profile.guardian_name, ems_profile.mother_name, ems_profile.spouse_name,
ems_profile.blood_group, ems_profile.mobile_number, ems_profile.personal_email,
ems_profile.employee_type, ems_profile.qualification, ems_profile.employee_code,
ems_profile.aadhar_number, ems_profile.pan_number, ems_profile.residential_address, ems_profile.basic_salary, ems_profile.permanent_address,
core_administrative_unit.name
from ems_profile left join core_administrative_unit on ems_profile.organization_unit = core_administrative_unit.id;
select designation, qualification from ems_profile;

select *, (select title from ems_options_designation where id = ems_profile.designation) as designation from ems_profile;

select id, title, first_name, middle_name,
last_name, name_in_hindi, guardian_name, mother_name, spouse_name,
blood_group, mobile_number, personal_email,
employee_type, qualification, employee_code, aadhar_number, pan_number, residential_address,
basic_salary, permanent_address, (select title from ems_options_designation where id = ems_profile.designation) from ems_profile;

select concat_ws(' ',title,first_name,middle_name,last_name) as fullname
from ems_profile;

select concat_ws(' ',title,first_name,middle_name,last_name) as full_name,
name_in_hindi as hindi_name , guardian_name as father_name ,
(select title from ems_options_designation where id = ems_profile.designation) as designation,
(select name from core_administrative_unit where id = ems_profile.organization_unit) as organization_unit , mother_name,
spouse_name, blood_group, mobile_number, personal_email, employee_type,
qualification, employee_code, aadhar_number,
pan_number, residential_address, basic_salary as salary, permanent_address
from ems_profile where spouse_name is not null and basic_salary is not null;

select designation, organization_unit from ems_profile;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant