|
SELECT a.duck_num duckNum,a.unit_name unitName,a.id duckId,IFNULL(b.duckWeight,'0') duckWeight,IFNULL(b.callDate,#{date}) callDate ,b.callCode callCode
|
|
SELECT a.duck_num duckNum,a.unit_name unitName,a.id duckId,IFNULL(b.duckWeight,'0') duckWeight,IFNULL(b.callDate,#{date}) callDate ,b.callCode callCode
|
|
-(select IFNULL(SUM(duck_weight),0) duckWeight,duck_num duckNum,duck_id duckId,call_date callDate ,call_code callCode from env_regular_call_feeding where call_date>#{date} and farm_id=#{farmId}) b ON a.id=b.duckId
|
|
|
|
|
|
+(select IFNULL(SUM(duck_weight),0) duckWeight,duck_num duckNum,duck_id duckId,call_date callDate ,call_code callCode from env_regular_call_feeding where call_date>#{date} and farm_id=#{farmId} GROUP BY call_code) b ON a.id=b.duckId
|