Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
17 lines
465 B
Plaintext
17 lines
465 B
Plaintext
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
|
@EndUserText.label: 'Product sales'
|
|
define view entity {{P}}I_PROD_SALES
|
|
as select from {{p}}prod as prod
|
|
inner join {{p}}sale as sale on sale.prod_id = prod.prod_id
|
|
{
|
|
key prod.prod_id as prod_id,
|
|
prod.prod_name as prod_name,
|
|
count( * ) as item_count,
|
|
sum( sale.quantity ) as total_qty
|
|
}
|
|
group by
|
|
prod.prod_id,
|
|
prod.prod_name
|
|
having
|
|
sum( sale.quantity ) >= 101
|