Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two queries into one query
Message
From
15/01/2006 01:56:39
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Two queries into one query
Miscellaneous
Thread ID:
01086905
Message ID:
01086905
Views:
58
I would like to have the following SQLs adjusted so I can have everything into on SQL:
SELECT WishList.Numero,SUM(Rate)/COUNT(*) AS Rating,COUNT(*) AS Rates FROM Rating;
 INNER JOIN WishList ON Rating.NoEntry=WishList.Numero;
 WHERE NoContent=2 GROUP BY 1 INTO CURSOR Temp
SELECT TOP 100 Temp.Numero,WishList.Title,Temp.Rating,Temp.Rates FROM Temp;
 INNER JOIN WishList ON Temp.Numero=WishList.Numero;
 ORDER BY 3 DESCENDING,4 DESCENDING INTO CURSOR Temp
Is this possible with such SQLs? I have tried to resolve that since about half an hour but cannot figure out the proper way to do it.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform