I have 3 tables
products
productid (int)
name (varchar)
price (float)
sales
salesid (int)
productid (int)
time (datetime)
links
linkid (int)
productid (int)
link (text)
Now I need a query that can display as
ProductID ProductName Sales Links
1 ABC 10 8
2 XYZ 15 12
I need all sales count and all links count for a particular product
How can I achieve this?
Thanks