docs.intersystems.com
Caché Web Applications Tutorial
The TopCategory Query
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Search:    

Here is the TopCategory query. Add it to Cinema.Film.

Query TopCategory(P1 As %Library.String) As %Library.SQLQuery(CONTAINID = 1)
{
 SELECT TOP 3 ID, Description, Length, Rating, Title, Category->CategoryName
 FROM Film
 WHERE (PlayingNow = 1) AND (Category = :P1)
 ORDER BY TicketsSold DESC
}


Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA