concourse
concourse copied to clipboard
Sort based on properties and link's value criteria
Hi, I have 2 main questions.
- Sorting: in SQL we could do something like this:
SELECT id, firstname, lastname, age ORDER BY age DESC LIMIT 10, 20
How can i do such thing with Concourse?
- Link-Search: If our data is:
[
[
'name' => 'John Doe',
'department' => 'Engineering',
'title' => 'Senior Software Engineer',
'role' => 'Software Engineer - Backend',
'manager' => Link::to_where('title = Director of Engineering'),
'salary' => 10.00,
'location' => 'Atlanta',
'exempt' => True
],
[
'name' => 'Jane Doe',
'department' => 'Engineering',
'title' => 'Director of Engineering',
'role' => 'Director',
'manager_of' => Link::to_where('department = Engineering'),
'salary' => 20.00,
'location' => 'Atlanta',
'exempt' => True
]
];
- How can i search for all people, where their manager's salary is 20.00? Something like this:
SELECT * FROM people WHERE manager IN ( SELECT id FROM people WHERE title = 'Director of Engineering' AND salary = 20.00 ) ORDER BY name ASC
Thanks Mehrdad
Any news?