我有sql request
,其中包含3个参数:
Article Name_customer id_customer.
我的要求是:
select "Article", "Client", "Name", round(sum("Montant_fac_eur")) as turnover
from "foundry_sync"."data"
where "Nature"='Repair'
and "annee" = {{w_widget24.selectedValue}}
and extract(month from "Facturation") between 0+{{w_widget4.selectedValue}} and 2+{{w_widget4.selectedValue}}
--and "Facturation" = {{w_widget6.selectedValue}}
group by "Article", "Client", "Name"
order by turnover DESC limit 5
我在横坐标轴上使用id_customer
,但我希望通过名称更改它。
问题是我的客户名称很长。
我可以对名称进行测试,只取5首字母,将其显示在我的仪表板中吗?
PS:知道我有一些名字是类似的,看起来像:
AEROSPARES 2000 LTD
AEROSPARES SHANNON
谢谢