Changes between Version 1 and Version 2 of Ticket #34413, comment 9


Ignore:
Timestamp:
Mar 13, 2023, 5:59:02 PM (20 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34413, comment 9

    v1 v2  
    2727}}}
    2828
    29 Isn't this report more about the ability of subquery to return more than one column?
     29Isn't this report more about the ability of subquery to return more than one column so the following is possible
     30
     31{{{#!sql
     32SELECT
     33    user.*,
     34    first_permission*
     35FROM user,
     36    (
     37        SELECT permission.id
     38        FROM permission
     39        JOIN group_permissions ON (group_permissions.permission_id = permission.id)
     40        JOIN user_groups ON (user_groups.group_id = group_permissions.group_id)
     41        WHERE user_groups.user_id = user.id
     42        ORDER BY permission.name
     43        LIMIT 1
     44    ) first_permission
     45}}}
Back to Top