var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Problem with a SELECT
Hello guys, this is my situation:
I Have the following tables;
Articles (Idarticlers#, PinV)
Sellers (PinV#, Name)
and i have to select the list of the Name of the sellers who have more Articles (in order)
what can i do?
and sorry for my english!
, (SELECT COUNT(*) FROM Articles a WHERE a.Pin = s.Pin) AS NumArticles
Thank you Very much jfulton!!
It works great!
I have a last question: how i can do to add the count(*) from two select?
my situation is this:
SELECT 4*COUNT(*) from Sell where month(date) = 10 and year(date) = 2005 + SELECT 12*COUNT(*) from services where month(date) = 10 and year(Date) = 2005
the + doesn't works i see...so what can i do?
If you want to retrieve a sum, the + should come in the select statement. ie.
You can nest statements in your queries for more complexity. Judging from the query you replied with, you may also want to read up on other functions like SUM() and DATE_FORMAT().
SELECT ( (SELECT COUNT(*) FROM table1) + (SELECT MAX(field) FROM table2) ) AS sum
Thank you very much jfulton! now it's all work fine!