가능한 중복 :
Sql Query throwing error쿼리 오류
내가 개월 분열과에 따라 표시에 따라 기록을 검색하는 쿼리를 시도하고 내가 요약해야하는 현명한 급여 수당 월, 또한 달 현명한 그들을 보여줍니다. 여기
쿼리 메신저하려고 : -select
pmc.[month] as 'Month',
pmc.pd_name_of_project as 'Name of Project',
tbl_div.name AS 'Name of Advisory Services Division',
TBL_PMC_UNIT.UNIT_NAME AS 'Name of Unit',
pmc.pd_project_type as 'Project Type',
pmc.accepted_tender_cost as 'Accepted Tender Cost',
pmc.work_order_date as 'Work Order Date',
pmc.tender_period_months as 'Tender Period',
pmc.project_completion_date as 'Project Completion Date',
pmc.per_pmc_charges as '% Of PMC Charges',
pmc.total_pmc_charges_scheme as 'Total PMC amount of the Scheme',
pmc.bill_amount_certified_upto_previous_month as 'Bill amount certified upto previous Month',
pmc.total_PMC_charges_upto_previous_month as 'Total PMC charges upto previous Month',
pmc.receipt_PMC_charges_upto_previous_month as 'Receipt of PMC Charges upto previous Month',
pmc.balance_of_PMC_charges_upto_previous_month as 'Balance of PMC charges upto previous Month',
pmc.bill_amount_certified_current_month as 'Bill amount certified During Current Month',
pmc.PMC_charges_for_current_month as ' PMC charges During Current Month',
pmc.receipt_PMC_charges_current_month as 'Receipt of PMC Charges During Current Monthh',
pmc.balance_of_PMC_charges_current_month as 'Balance of PMC charges During Current Month',
SUM(pmc.salary_allowance) as 'Salary & Allowance Division'
FROM
TBL_PMC pmc
INNER JOIN TBL_DIV
ON TBL_DIV.ID = pmc.DIV_ID
LEFT OUTER JOIN TBL_PMC_UNIT
ON TBL_PMC_UNIT.ID=pmc.UNIT_ID
WHERE
pmc.div_id= 17
--and [email protected]_id;
group by
pmc.[month]
임 다음과 같은 오류를 가지고 : - 그것은 집계 함수 또는 중 하나에 포함되지 않기 때문에 열 'TBL_PMC.pd_name_of_project'는 선택 목록에서 유효하지 않습니다 GROUP BY 절. 모든 열에 집계 함수를 사용하고 싶지 않습니다 ... 몇 열을 요약해야합니다 !!
파티션을 .....하지만 데이터로 오는 6 월 한 달이 3 개 기록 .... 3 개 행이있는 경우 일이 ...입니다 : –