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)
Archives
-
▼
2010
(41)
-
▼
September
(16)
- DO Lacta Report
- Menghitung Selisih Dua Tanggal atau Dua Waktu
- Produk IF1
- MYSQL tanpa NOLOCK
- Limit - MySQL Command
- SQL COPY TABLE Command
- Point Reward
- Kirim SMS dengan PHP via gammu ()
- sql query dari php ke crystal report
- PHP + COM + Crystal Reports
- PHP & Crystal Reports - Can't Quit ActiveX Designe...
- Memanggil Crystal Report dari PHP
- Membuat Captcha dengan PHP (bag 2)
- Membuat Captcha dengan PHP (bag 1)
- Membuat PHP Captcha Sendiri
- Random Quotes dengan PHP
-
▼
September
(16)
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 aa.customer_id, aa.customer_name, aa.customer_address, aa.customer_phone, aa.pointtype, (aa.satu + aa.dua) as point
from
(
select pr.customer_id, cu.customer_name, cu.customer_address, cu.customer_phone,
(case when pr.point_reward_type_id = "1" then "Point Reward"
when pr.point_reward_type_id = "2" then "Redeemed" end) as pointtype,
(case when pr.point_reward_type_id = "1" then sum(pr.total_point) else 0 end) as satu,
(case when pr.point_reward_type_id = "2" then sum(pr.total_point) else 0 end) as dua
from point_reward as pr, customer cu
/* where pr.customer_id = "081001080800040022" */
where pr.customer_id = '01080800040427' and pr.customer_id = cu.customer_id
group by pr.customer_id, pr.point_reward_type_id
order by pr.customer_id, pr.point_reward_type_id
) aa
order by aa.customer_id, aa.customer_name, aa.customer_address, aa.customer_phone, aa.pointtype
from
(
select pr.customer_id, cu.customer_name, cu.customer_address, cu.customer_phone,
(case when pr.point_reward_type_id = "1" then "Point Reward"
when pr.point_reward_type_id = "2" then "Redeemed" end) as pointtype,
(case when pr.point_reward_type_id = "1" then sum(pr.total_point) else 0 end) as satu,
(case when pr.point_reward_type_id = "2" then sum(pr.total_point) else 0 end) as dua
from point_reward as pr, customer cu
/* where pr.customer_id = "081001080800040022" */
where pr.customer_id = '01080800040427' and pr.customer_id = cu.customer_id
group by pr.customer_id, pr.point_reward_type_id
order by pr.customer_id, pr.point_reward_type_id
) aa
order by aa.customer_id, aa.customer_name, aa.customer_address, aa.customer_phone, aa.pointtype
Labels: PT Comment Indonesia
0 Comments:
Subscribe to:
Post Comments (Atom)