On 9/3/2013 6:52 PM, ChingChang Hsiao wrote:
What is the count of services have more than 2 service_port(sp) and type is 
e-lan? The answer is 1. Could it be described as one sql statement?

select count(*) from service_table s
where service_type = 'e-lan' and
(select count(*) from service_port_table sp where s.service_no = sp.service_no) > 2;

--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to