
366 P.2d 366 (1961)
Margaret B. AHERN et al., Plaintiffs in Error,
v.
George J. BAKER, individually and as Secretary of State of the State of Colorado, Defendant in Error.
No. 19503.
Supreme Court of Colorado. En Banc.
November 20, 1961.
John D. Saviers, Louis F. Pell, Jr., Aurora, for plaintiffs in error.
Duke W. Dunbar, Atty. Gen., Frank E. Hickey, Deputy Atty. Gen., Charles S. Thomas, Asst. Atty. Gen., for defendant in error.
DAY, Justice.
This writ of error is directed to a judgment of dismissal entered by the trial court after submission of the issues upon stipulation of the parties. We will refer to the parties as they appeared in the trial court, where plaintiffs in error were plaintiffs, and defendant in error Baker as Secretary of State was defendant.
Plaintiffs, severally either in their own names or through corporate entities, hold licenses to sell liquor in Colorado by the package. Many of them are in the package liquor business exclusively. Others conduct such business in a licensed drugstore. Defendant Baker is the duly elected Secretary *367 of State and as such is the liquor licensing authority for the State of Colorado.
Plaintiffs brought the action purportedly under Rule 57, R.C.P. (Declaratory Judgment) and under Rule 106, R.C.P. (Certiorari and Mandamus). After considering the stipulation and arguments of counsel, the court dismissed the action for a number of reasons, pertinent among which was the finding, "That the declaratory judgment sought herein is not a proper remedy."
The court also found that while this is a class action, there has been no service on all the members of the class, or, in fact, on necessary parties to it. The court stated in its conclusion:
"It is well settled that a court may refuse to render a declaratory judgment which, if rendered, would not terminate the uncertainty or determine the controversy giving rise to the proceeding.
"The necessary and indispensable parties to any declaratory judgment are those who have a legal interest in the controversy to be adjudicated, and whose rights will be affected thereby, and jurisdiction must be obtained on all such parties." (Emphasis supplied.)
The court failed to note, upon which we will comment later, the fact that there was no controversy. The parties plaintiff did not establish by their stipulation that they were in any manner "aggrieved". Since a reading of the complaint indicates that the plaintiffs did not state any claim upon which relief could be granted, the court should not have entertained the action upon its merits. However, the judgment of dismissal was correct.
The questions before this court are:
1. Whether the plaintiffs, either in their complaint or in the stipulation, to which the defendants agreed, established that their rights, status or other legal relations are affected by the liquor code.
2. Whether all persons were made parties "who have or claim any interest which would be affected by the declaration."
3. Whether the complaint states a claim under Rule 106, R.C.P. Colo.
The main allegation of plaintiffs' complaintwhich defendant admittedis that certain licensed package liquor dealers in the State of Colorado deliver malt, vinous and spirituous liquors to the customer's premises and receive cash for the same at the premises of the purchasers upon delivery of the goods. The complaint further alleged that plaintiffs have made demand in writing and in person upon the Secretary of State to prohibit such sales. They explain their action thus: "That this action is brought pursuant to Rule 106 of the Colorado Rules of Civil Procedure to compel the Secretary of State of Colorado to perform the acts complained of and which the law specially enjoins as a duty resulting from the public office held by him."
They contend by means of the doings and omissions of the defendant that plaintiffs have been greatly aggrieved and wronged. They state that they "have no plain, speedy or adequate remedy in the ordinary course of law whereby their rights can be upheld or whereby the Secretary of State can be compelled to perform such acts as required by law." They seek a declaration of the court "regarding the lawfulness" of C.R.S. `53, 75-2-3(8) and (12).
1. The question whether the action is one for declaratory judgment.
"The general or primary purpose of a declaratory judgments statute is to provide a ready and speedy remedy, in cases of actual controversy, for determining issues and adjudicating the legal rights, duties, or status of the respective parties, before controversies with regard thereto lead to the repudiation of obligations, the invasion of rights, and the commission of wrongs. * * *" 1 C.J.S. Actions § 18(3), p. 1022. (Emphasis supplied.)
In this action the parties plaintiff sought to have the court declare C.R.S. `53, 75-2-3(8) and (12) to be "constitutional and lawful". From the record before us it does not appear that anyone is *368 contending to the contrary. Certainly not the Secretary of State who in administering the statute has not in any manner interfered with the plaintiffs in the operation of their businesses. There was no showing by statement, stipulation or inference that plaintiffs have been "aggrieved or wronged" nor have their rights under the statute been in any manner impaired.
It is to be noted that none of the licensees in the statethe number of whom was not disclosedwho make deliveries as a regular service to their customers were made parties to the action. The plaintiffs sought no relief for themselves but rather to "compel" the Secretary of State to take punitive action against others not before the court. Plaintiffs seek a judicial declaration not as to their own rights and status but attempt to have others not named or served declared to be in some "unlawful" status. No error was committed by the trial court in holding that declaratory judgment was not a proper remedy.
2. The question whether parties who would be affected are before the court.
In People ex rel. Inter-Church Temperance Movement v. Baker, 133 Colo. 398, 297 P.2d 273, the plaintiffs representing the Inter-Church Temperance Movement sought to have certain sections of the liquor code declared to be violative of Article XXII of the Constitution. A similarity between that and this case is that there the parties who held licenses under the authority of the Secretary of State and who would have been affected in the operation of their business by any action of the court, were not made parties. It was held that such licensees who had a stake in the outcome of the litigation were necessary parties and that a declaratory judgment would not operate to terminate the endless litigation that would be generated by each holder's license being placed in jeopardy.
In Gabriel v. Board of Regents etc., 83 Colo. 582, 267 P. 407, 408, it was said:
"* * * This act was not intended to repeal the statute prohibiting judges from giving legal advice, nor to impose the duties of the profession upon the courts, nor to provide advance judgments as the basis of commercial enterprises, nor to settle mere academical questions. * * *"
We conclude that the trial court did not err in holding that necessary and indispensable parties were not before the court.
3. Was the complaint sufficient to bring the action within Rule 106, R.C.P. Colo.?
The complaint carries the "caption" and an allegation that the action also is instituted under Rule 106, but the stipulation indicates clearly that the remedy sought was not in the nature of certiorari. There was nothing upon which certiorari could operate. There were no proceedings before the Secretary of State for the court to review. There was no complaint of excess of jurisdiction, and the Secretary of State not having acted at all, cannot be said to have abused his discretion. Nor is the use of such words as "compel", and the prayer that the court "order" the Secretary of State "to perform" in a specified manner in the enforcement of the liquor code "as a duty resulting from his office" sufficient to invoke the issuance of a writ of mandamus.
In Hall v. City and County of Denver, 117 Colo. 508, 190 P.2d 122, 124, the court defined the effect of Rule 106:
"* * * We have recently held, however, in North Poudre Irrigation Co. v. Hinderlider, 112 Colo. 467, 474, 150 P.2d 304, 308: `While Rule 106, Rules of Civil Procedure Colo., pertaining to remedial writs, "abolishes the special form of pleading," writ and name of the remedy theretofore known as mandamus, the substantive aspects of such proceedings are preserved, and relief of the same nature as was formerly provided in mandamus actions may be granted in accordance with precedents established under the old practice.'
*369 "Proceeding from that premise, it is clear that plaintiffs, as pointed out by the trial court, were not entitled to relief in mandamus which has its function in those cases where the duty of the public officer or board is purely ministerial and not discretionary. People ex rel. v. Spruance, 8 Colo. 307, 6 P. 831; People ex rel. [Foley] v. Stapleton, 98 Colo. 354, 56 P.2d 931. * *"
An examination of the general principles relating to the propriety of relief in mandamus discloses the following: "* * * public officers will not be compelled by mandamus to enforce liquor laws, since it would entail the ordering of a course of action which is to some extent discretionary, and a control and supervision that would be difficult if not impossible; * * *." 30 A.J. § 289, p. 703. Further, "* * * mandamus will not lie to enforce duties generally, or to control and regulate a general course of official conduct for a long series of continuous acts to be performed under varying conditions," and "mandamus will not ordinarily be granted to compel police officers to enforce the police or criminal laws generally, such as laws regulating * * * intoxicating liquors, or the keeping of places of business open for the sale of liquors on Sundays or holidays." 34 A. J. 935, § 157.
Also in 55 C.J.S. Mandamus § 157, p. 306, it is stated that the general rule is that "a writ of mandamus will not be issued with respect to the making or enforcement of police regulations except to enforce a clear legal right or to compel the performance of a clear legal duty. * * *" For Colorado authority that the one bringing the action must show a clear legal right to demand the performance of a certain act as well as a clear legal duty on the part of the officer to do the thing demanded, see Civil Service Commission v. People ex rel. Beates, 88 Colo. 319, 295 P. 920; Schneider v. People ex rel. Grant, 95 Colo. 300, 35 P. 2d 498. In People ex rel. Harper v. Ingles, 106 Colo. 213, 103 P.2d 475, there was reiterated the rule that before mandamus will issue there must be a clear legal duty imposed upon the official before he can be compelled to act.
The trial court limited its findings to the question of the propriety of declaratory judgment, and did not comment upon the attempted action in mandamus. It makes no difference, however, that the trial court did not fully discuss the attempt to bring the action within Rule 106.
The judgment of the trial court in dismissing the action was correct and is affirmed.
PRINGLE, J., does not participate.
