我试着计算列Trans的税前税额,如下所示:
SELECT
Loyalty_Type_Code,
COUNT([Loyalty_Number]),
FORMAT(SUM([Trans_Det_Amt_ex_Tax]), '##,###,###,##0')
FROM
CRM_POWERBI_RETAIL
WHERE
Trans_Hdr_Sale_Date BETWEEN '2019-01-01' AND '2019-10-31'
GROUP BY
Loyalty_Type_Code
UNI
public static void updatecasefields(List<Case> lstcase) {
//List<Case> lstcase = new list<case>();
ID devRecordTypeId = Schema.SObjectType.Case.getRecordTypeInfosByDeveloperName().get('CRM_CSR_Case').getRecordTypeId();
for (Case cs: lstcase) {
我的疑问是
SELECT count(crm_clients.client_id) as count, (((sum(expectd_rev)/1000) +((COALESCE((sum(COALESCE(client_rating,0))/count(crm_client_assign.client_id)),0)*100)/5))/392.10000000)*100 as val
FROM (`crm_clients`)
JOIN `crm_project_assign` ON `crm_clients`.`client_id` = `crm_project_assign`.`clien
我有5个表,使用oracle过程如何从这5个表中提取选定的列,并将所有行作为不带联接的简单select查询返回。我已经写了这个程序,但我无法得到想要的结果。
create or replace
PROCEDURE NOTIFICATIN_REPORT_TEST(
para_claim_no IN VARCHAR2,
O_CRM_ACC_CAL_GARAGE out CRM_CLAIM_INT_DETAILS_VIEW.CRM_ACC_CAL_GARAGE%type,
O_CRM_ACC_DAM_COMP out CRM_CLAIM_INT
可能重复:
我需要一个MySQL查询,它将选择一些包含今天日期的数据。我构建了以下查询:
SELECT CRM_TRATATIVAS.ID_Vendedor, CRM_TRATATIVAS.Fecha
FROM CRM_TRATATIVAS
GROUP BY CRM_TRATATIVAS.ID_Vendedor, CRM_TRATATIVAS.Fecha, CRM_TRATATIVAS.ID_Categoria
HAVING (((CRM_TRATATIVAS.ID_Vendedor)=10 Or (CRM_TRATATIVAS.ID_Vendedor)=29 Or (CRM_TRA
我有下面的查询,它会产生一个错误
SELECT CRM_PRESUPUESTOS.Fecha_Alta, CRM_PRESUPUESTOS.ID_VendedorAsignado, Sum([Precio]*(100-[CRM_PresupuestosDetalles].[Bonif])/100*[CRM_PresupuestosDetalles].[Cantidad]) AS LineaNeto
FROM CRM_PRESUPUESTOS RIGHT JOIN CRM_PresupuestosDetalles ON CRM_PRESUPUESTOS.ID_Presupuesto = CRM_
我正在尝试在活动记录中转换此查询
SELECT
crm_clients.id,
crm_clients.`moved_date`,
crm_clients.`contractor_id`
FROM
dev_pfands.`crm_clients`
WHERE crm_clients.`contractor_id` = 11
AND (
crm_clients.`status` = 9
OR crm_clients.`status` = 8
OR crm_clients.`status` = 7
)
AND crm_clients.id IN
(SELECT
crm_clie