fix: GROUP BY currency加表前缀dm_model_call_fact消除ambiguous警告
This commit is contained in:
parent
6fb1b8cf44
commit
72eeba1c2a
@ -191,7 +191,7 @@ async def get_currency_breakdown(env, sor):
|
|||||||
COALESCE(SUM(amount_cny), 0) as amount_cny
|
COALESCE(SUM(amount_cny), 0) as amount_cny
|
||||||
FROM dm_model_call_fact
|
FROM dm_model_call_fact
|
||||||
WHERE call_date = ${today}$
|
WHERE call_date = ${today}$
|
||||||
GROUP BY currency
|
GROUP BY dm_model_call_fact.currency
|
||||||
ORDER BY call_count DESC"""
|
ORDER BY call_count DESC"""
|
||||||
recs = await sor.sqlExe(sql, {'today': env.curDateString()})
|
recs = await sor.sqlExe(sql, {'today': env.curDateString()})
|
||||||
return [{
|
return [{
|
||||||
|
|||||||
@ -178,7 +178,7 @@ async def aggregate_daily_perf(sor, stat_date=None):
|
|||||||
SUM(amount) as total_amount
|
SUM(amount) as total_amount
|
||||||
FROM dm_model_call_fact
|
FROM dm_model_call_fact
|
||||||
WHERE call_date = ${stat_date}$
|
WHERE call_date = ${stat_date}$
|
||||||
GROUP BY call_date, llmid, model, catelogid, providerid, ownerid, userorgid, currency
|
GROUP BY call_date, llmid, model, catelogid, providerid, ownerid, userorgid, dm_model_call_fact.currency
|
||||||
"""
|
"""
|
||||||
rows = await sor.sqlExe(sql, {'stat_date': stat_date})
|
rows = await sor.sqlExe(sql, {'stat_date': stat_date})
|
||||||
info('sage_datamart AGG: aggregating ' + str(len(rows)) + ' groups for ' + stat_date)
|
info('sage_datamart AGG: aggregating ' + str(len(rows)) + ' groups for ' + stat_date)
|
||||||
@ -236,7 +236,7 @@ async def aggregate_provider_cost(sor, stat_date=None):
|
|||||||
AVG(ttft_ms) as avg_ttft
|
AVG(ttft_ms) as avg_ttft
|
||||||
FROM dm_model_call_fact
|
FROM dm_model_call_fact
|
||||||
WHERE call_date = ${stat_date}$
|
WHERE call_date = ${stat_date}$
|
||||||
GROUP BY model, providerid, currency
|
GROUP BY model, providerid, dm_model_call_fact.currency
|
||||||
"""
|
"""
|
||||||
rows = await sor.sqlExe(sql, {'stat_date': stat_date})
|
rows = await sor.sqlExe(sql, {'stat_date': stat_date})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user