Pages
Labels
- Bisnis (1)
- CIT Scripts - Financore (5)
- Cokelat (3)
- MySQL (2)
- PHP (23)
- PT Comment Indonesia (10)
- SQL Query (2)
- SQL Server 2000 (4)
- SQL Server 2005 (4)
- Tips - Tricks Cokelat (2)
Link List
- Code Igniter Indonesia
- MySQL Reference Manuals
- MySQL Tutorial
- SQL Developer
- 9 Useful jQuery Calendar and Date Picker Plugins For Web Designers
- 10 Powerful AJAZ jQuery File Uploaders
- 35 Useful jQuery Plugins for Slideshows, Graphs and Text Effects
- 30 jQuery Calendar Date Picker Plugins
- jQuery
- Web Developers Notes
- SQL Copy MySQL Table
- Natural Cooking Club Indonesia
- Aneka Resep Praline - Sedap Sekejap
- Resep Cokelat
- Pastry and Bakery
- Peluang Bisnis Hotspot
- Billing Hospot
- JpGraph
- Zend Developer Zone
- MySQL Tutorials and Others
- W3 School
- Open Source Projects
select cu.customer_id as ID,cu.customer_name as NAMA,cu.customer_phone as PHONE1,cu.customer_phone_2 as PHONE2,cu.customer_address as ALAMAT, pl.product_id as PRODUK,cs.calling_strike_name,(select max(calling.phone_date)
from calling where calling.customer_id=cu.customer_id and calling.calling_target_name=pl.consumed_by) as telepon from customer cu
inner join product_log pl on pl.customer_id=cu.customer_id
inner join calling ca on ca.customer_id=cu.customer_id
inner join calling_strike cs on cs.calling_strike_id=ca.calling_strike_id
where ca.calling_strike_id='10'
and pl.product_id='lacta'
and cu.submit_date<='2010-12-09'
and pl.consumed_by=cu.customer_id
and
(select ca2.calling_strike_id from calling ca2
where ca2.customer_id = cu.customer_id
and ca2.phone_date =
(select max(ca1.phone_date) from calling ca1 where ca1.customer_id = cu.customer_id) limit 1)
not in ('12', '17')
group by cu.customer_id
order by cu.customer_name
Labels: PT Comment Indonesia