Re: [SQL] SUM() & GROUP BY

2004-05-07 Thread Martin Kuria
do advice thanks again. Kind Regards +-+ | Martin W. Kuria (Mr.) [EMAIL PROTECTED] ++ >From: Richard Huxton <[EMAIL PROTECTED]> >To: Martin Kuria <[EMAIL PROTECTED]> >CC: [EMA

Re: [SQL] SUM() & GROUP BY

2004-05-06 Thread Martin Kuria
Hi again I have two tables I would like to query i.e. service table and division table SELECT s.pd_geo, COUNT(s.pd_geo) FROM ser s GROUP BY s.pd_geo; OUTPUT: pd_geo | count -- 1| 49 2| 39 3|6 4|54 SELECT d.divisions_name, d.divis

Re: [SQL] search facilities

2003-11-12 Thread Martin Kuria
Kind regards +-+ | Martin W. Kuria (Mr.) [EMAIL PROTECTED] ++ From: Oleg Bartunov <[EMAIL PROTECTED]> To: Martin Kuria <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], [EMAIL PROTECTED]

[SQL] search facilities

2003-11-07 Thread Martin Kuria
Hi, I have a content management system, for my database driven website developed using php and postgresql but I don't know how to develop a search facility for it. How do I go about it?. I have seen database driven website developed using php and postgresql and they have their built search fac

[SQL] sub query

2003-09-20 Thread Martin Kuria
Hi again I have this problem when I try to run this query, how can I rewrite it for it to work. SELECT o.item_order_num,SUM(o.item_quantity + o.item_product_id) As total, o.item_status FROM soko_product p, soko_ordered_item o WHERE p.product_id = o.item_product_id GROUP BY o.item_order_num ORDER

Re: [SQL] sub query

2003-09-17 Thread Martin Kuria
Thanks Haller, the second one worked thanks a million be blessed Regards +-+ | Martin W. Kuria (Mr.) [EMAIL PROTECTED] ++ From: Christoph Haller <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] CC:

[SQL] sub query

2003-09-17 Thread Martin Kuria
Hi I have this problem, when I try to run this query: SELECT MAX(d), host_position FROM (SELECT host_position, COUNT(host_position) as d FROM sss_host GROUP BY host_position) as e; am getting and ERROR: Attribute e.host_position must be GROUPed or used in an aggregate function. Please to advic

[SQL] sub query

2003-09-17 Thread Martin Kuria
Hi I have this problem, when I try to run this query: SELECT MAX(d), host_position FROM (SELECT host_position, COUNT(host_position) as d FROM sss_host GROUP BY host_position) as e; am getting and ERROR: Attribute e.host_position must be GROUPed or used in an aggregate function. Please to advic