Home > database >  SQL problem solving!!!!!!!!!!!!!!!!!!!
SQL problem solving!!!!!!!!!!!!!!!!!!!

Time:03-20

SELECT ROUND (COUNT (*)/100, 1) AS y, t AS x FROM tc (
SELECT the CASE WHEN the SUM (b.B RGEW) & lt; THEN=5 '5'
WHEN the SUM (b.B RGEW) & gt; 5 AND the SUM (b.B RGEW) & lt; 10 THEN='5-10'
WHEN the SUM (b.B RGEW) & gt; 10 AND the SUM (b.B RGEW) & lt; 15 THEN='10-15'
WHEN the SUM (b.B RGEW) & gt; 15 THEN '15' ELSE NULL END ct
The FROM bp_db. Bs_AL_SALES_AND_ALLOCATION_QUERIESm a JOIN sap_db. AL_PRODUCT_PLAN b ON arjun aterial_numb=biggest _code

/* the join cp_db. Bs_org_factory d on a.f act_code=d.z plant */
WHERE SUBSTR (con_date, 1, 6)=DATE_FORMAT (DATE_ADD (CURDATE (), the INTERVAL of 1 MONTH), '% % m Y') AND fact_doc not LIKE '% % distribution'
AND tos NOT IN (' trains distribution ', 'shipping AND distribution) AND sale_office NOT IN (' 1020', '1019', '4650', '1021') AND cust_name NOT IN (' points storehouse of damage compensation for one-time customers')
GROUP BY a.o r_numb) t GROUP BY tc t

Bosses, this is the complete code, can you tell me the fact_doc, tos, sale_office, cust_name this a few fields corresponding is the table,

CodePudding user response:

Is not a table, a table is b

Best to manually specifying, if you don't specify table, automatically to match the query, matching to the who is who

CodePudding user response:

Ah, I now only code, without the background database, manual check not ah

CodePudding user response:

You this problem is to ask a stranger: my grandmother eat breakfast this morning?
You don't know, other people don't know, of course,

Without permission, looking for a permission to go to, just to ask,
  • Related