I want to write a SQL query to generate salaries of all staff members as an individual , department and on the basis of course they are teaching. I have no idea about SQL. Please help me regarding this.
Not sure we can help you with the learning of SQL. There are countless sources on that subject in the cloud tho.
I would generate the salaries with spreadsheet but it seems a good idea to collect all data using SQL. You need to link quite a number of tables tho, e.g. gibbonPerson, gibbonCourse, gibbonCourseClass, gibbonCourseClassPerson, gibbonSchoolYear, gibbonStaff, etc.
It won’t be easy without having some SQL basics. Good luck tho.
The query below might help you get started : ) It is drawn from our gibbonedu.com library of Value Added License queries:
surname, preferredName, email, dob,
CONCAT(phone1Type,’ ‘,phone1CountryCode,’ ‘, phone1) AS phone1,
CONCAT(phone2Type,’ ‘,phone2CountryCode,’ ‘, phone2) AS phone2,
CONCAT(phone3Type,’ ‘,phone3CountryCode,’ ‘, phone3) AS phone3,
CONCAT(phone4Type,’ ‘,phone4CountryCode,’ ', phone4) AS phone4,
emergency1Name, emergency1Number1, emergency1Number2, emergency1Relationship,
address1 AS personaladdress, address1District AS personaladdressDistrict, address1Country AS personaladdressCountry,
JOIN gibbonStaff ON (gibbonStaff.gibbonPersonID=gibbonPerson.gibbonPersonID)
ORDER BY surname, preferredName
If you are interested in support, we can offer that through gibbonedu.com: if you purchase an annual license we can write the query you are after.