Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5sejRr8s3kapmRY2g
14 lines
793 B
Plaintext
14 lines
793 B
Plaintext
# @Query with aliases, declared as an interface projection
|
|
select e1_0.first_name,e1_0.last_name from employee e1_0 where e1_0.salary>?
|
|
rows: 6, first getFirstName(): First6
|
|
|
|
# @Query with a constructor expression (select new ...DepartmentPay)
|
|
select d1_0.name,count(e1_0.id),sum(e1_0.salary) from employee e1_0 join department d1_0 on d1_0.id=e1_0.department_id group by d1_0.name order by d1_0.name
|
|
DepartmentPay[department=Engineering, headcount=4, totalSalary=218000.00]
|
|
DepartmentPay[department=HR, headcount=4, totalSalary=226000.00]
|
|
DepartmentPay[department=Sales, headcount=4, totalSalary=222000.00]
|
|
|
|
# native query with column aliases equal to the getter names
|
|
select first_name as firstName, last_name as lastName from employee where salary > ?
|
|
rows: 6, first getFirstName(): First6
|