This is a well-known problem in general: filters like TakeLargest must usually be applied last, since one usually wants to limit the already filtered result set. The short syntax does not respect that order.
The simplest way to get the desired result is probably this:
EntityList @ EntityClass[
EntityClass["Company", {"Industry" -> "Discount Stores"}],
{"TotalRevenue" -> TakeLargest[1]}
]
(* {Entity["Company", "WalMartStores::zsp93"]} *)
Operations such as TakeLargest are essentially composite in nature (in this case, essentially it is Sort followed by Take). It is instructive to consider an alternative approach, which is unfortunately considerably slower (for built-in entities. For entities backed by a relational database, the speed should be the same as in the first approach), but can be used as a blueprint for more complex filtering criteria:
EntityList @ SortedEntityClass[
FilteredEntityClass[
"Company",
EntityFunction[c, c["Industry"] === "Discount Stores"]
],
"TotalRevenue" -> "Descending",
1
]
(* {Entity["Company", "WalMartStores::zsp93"]} *)
Here one could, of course, also use the short form EntityClass["Company", {"Industry" -> "Discount Stores"}] instead of FilteredEntityClass, which I have used just for an illustration.