concourse icon indicating copy to clipboard operation
concourse copied to clipboard

Sort based on properties and link's value criteria

Open mehrdd opened this issue 6 years ago • 1 comments

Hi, I have 2 main questions.

  1. 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?

  1. 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

mehrdd avatar Feb 22 '19 21:02 mehrdd

Any news?

mehrdd avatar Apr 03 '19 16:04 mehrdd