Lena has a Go program that creates an in-memory SQLite database with the employees table that has records of all the employees in her company:
Now she wants to perform the following tasks:
- Retrieve only the different/unique
titlevalues from theemployeestable sorted in descending order, then save them in thejobTitlesslice and print the contents of thejobTitlesslice.
- Retrieve only the different/unique
departmentvalues from theemployeestable sorted in ascending order, then save them in thedepartmentsslice and print the contents of thedepartmentsslice.
Lena has already created the Employee model struct, declared the jobTitles and departments slices, and written the statements to print the slices. Your task is to help her write the additional required code to perform the two tasks mentioned above.