Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unfortunately the linebreaks were lost and, as shown that isn't a valid PRQL query. It would have to be either

    from employees
    group role (
        sort join_date 
        take 1
        )
or

    from employees | group role (sort join_date | take 1)
In English:

    Take the 1st employee 
    by (earliest) join_date 
    for each role 
    from the set of employees


ClickHouse:

SELECT * FROM employees ORDER BY join_date LIMIT 1 BY role




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: