Select to view content in your preferred language

Make Aggregation Query Layer — More intuitive table alias naming in SQL of output query layer

321
1
06-14-2024 07:55 AM
Status: Open
Labels (1)
Bud
by
Esteemed Contributor

ArcGIS Pro 2.9.5; Oracle 18c 10.7.1 EGDB:

I've created a query layer using the Make Aggregation Query Layer tool.

Bud_0-1718376358466.png

This is what the SQL of the resulting query layer looks like:

Bud_2-1718376491466.png

I've formatted the SQL for easy viewing:

select 
    t.*,
    row_count
from 
    infrastr.strln_route t
inner join 
    (select 
        asset_id,
        count(*) as row_count
    from 
        infrastr.lc_events
    group by 
        asset_id
    ) s 
on t.rdsec = s.asset_id


I can imagine that the FC is aliased as  t  for "target feature class". But why is the table aliased as  s  ? What does "s" stand for?

Could those aliases be improved so that they're more intuitive? For example:

  • FC for Feature Class; TBL for Table.
  • Or something better
1 Comment