
331 So.2d 665 (1976)
JEANNIE'S GROCERY et al.
v.
BALDWIN COUNTY ELECTRIC MEM. CORP.
SC 1187.
Supreme Court of Alabama.
April 30, 1976.
J. Don Foster, Foley, Fred G. Helmsing, Mobile, Champ Lyons, Jr., Montgomery, for appellants.
John Chason, Bay Minette, Charles B. Arendall, Jr., and W. Ramsey McKinney, Jr., Mobile, for appellee.
ALMON, Justice.
This is an appeal from a judgment of the Circuit Court of Baldwin County dismissing the complaint of appellants, Jeannie's Grocery et al.
The complaint was filed as a class action suit against appellee, Baldwin County Electric Membership Corporation, a cooperative, organized under the Electric Cooperative Act, Act 231, Alabama Laws, 1939, Tit. 18, Chapter 3, Sections 31-59, Code of Alabama 1940, Recompiled 1958, in contemplation of the Rural Electrification Act of 1936 as amended, 7 U.S.C., Sections 901-950(b).
Appellants brought this action on behalf of themselves and members of a class. The class was broken into sub-classes of "residential" and "commercial" consumers of electricity supplied by appellee. Appellants complained of the implementation of a seasonal premises classification which resulted *666 in the charges to them and others similarly situated of higher rates than those not so classified. It was further averred by appellants that the criteria for determination of seasonal premises consumers was arbitrary, capricious, not reasonably related to a rational standard for determination of "seasonal premises" consumers, and that the degree of disparity in price treatment between those subject to the seasonal premises classification and those not subject to it constituted an unlawful price discrimination. Finally, appellants averred that the appellee is a public service corporation and, as such, has an obligation independent of contract, franchise, or statute, not to charge extortionate or discriminatory rates and has breached that obligation.
Appellants claimed money damages plus attorney's fees.
The rate classification complained of by appellants incorporated a "demand charge" factor. Essentially, the members of appellee included in this classification were charged at the rate of 75% of their peak electrical demand for the preceding eleven months, regardless of the amount of electrical energy actually used by them.
The only issue on appeal is whether the trial court erred in granting appellee's motion to dismiss.
Appellants contend that even if they are denied the specific relief requested in the form of money damages, they have alleged sufficient facts to authorize the court to award declaratory or injunctive relief on the question of whether the rates imposed upon appellants were discriminatory and unreasonable.
Appellants also contend that the trial court erred in its determination that it lacked jurisdiction over the subject matter and in its conclusion that appellee is immune from judicial review.
The principal points of appellee's argument in response may be summarized as follows:
1. Sections 42 and 43 of the Alabama Constitution of 1901 bar the judiciary from exercise of legislative power or assumption of legislative functions.
2. Rate making is a legislative function, not a judicial function.
3. The judiciary cannot engage in rate making, either directly or indirectly.
4. The appellants here are asking the court to determine what their reasonable electrical rate would have been and award them damages for the difference between that rate and what they actually paid.
5. To determine damages, therefore, would necessarily involve the court in retrospective rate making, a function which the judiciary is constitutionally barred from undertaking.
Three grounds were set forth in appellee's motion to dismiss the complaint. They are set out in the transcript as follows:
"1. The Second Amended Complaint and each cause of action asserted therein fail to state a claim upon which relief can be granted.
"2. The Court lacks jurisdiction to grant the relief demanded with respect to each cause of action asserted in the Second Amended Complaint.
"3. The Court lacks jurisdiction over the subject matter of the Second Amended Complaint."
When the trial court granted the motion to dismiss, it did not state upon which of three grounds it was granting the motion. Therefore, we will consider each of the grounds individually.
The first ground in the motion is under Rule 12(b)(6) of the Alabama Rules of Civil Procedure. This is a motion which should seldom be granted and should *667 only be granted when "it appears beyond doubt that the plaintiff can prove no set of facts in support of his claim which would entitle him to relief." Conley v. Gibson, 355 U.S. 41, 45-45, 78 S.Ct. 99, 102, 2 L.Ed.2d 80 (1958); Trabits v. First National Bank, 295 Ala. 85, 323 So.2d 353, 358 (1975). It does not appear to us that at this stage of the case the appellants would be unable to prove any set of facts in support of their claim which would entitle them to relief.
Grounds two and three both seem to encompass Rule 12(b)(1), which is a motion to dismiss for lack of jurisdiction over the subject matter.
While we are cognizant that courts do not engage in rate making, we are not persuaded that, under any conceivable set of circumstances, the appellants are without judicial remedy of any kind. It would be premature for us now to address ourselves to subject matter jurisdiction. For to do so would of necessity require us to engage in speculation since we are without the benefit of facts beyond those alleged in the complaint.
There was some suggestion in the trial court's order that one of the reasons for granting the motion to dismiss was the appellants' failure to seek declaratory or injunctive relief. If this was a reason for the dismissal of the action, it was error. Rule 54(c) of the Alabama Rules of Civil Procedure states that ". . . [e]xcept as to a party against whom a judgment is entered by default, every final judgment shall grant the relief to which the party in whose favor it is rendered is entitled, even if the party has not demanded such relief in his pleadings."
The judgment is hereby reversed and the cause remanded.
REVERSED AND REMANDED.
HEFLIN, C.J., and BLOODWORTH, FAULKNER and EMBRY, JJ., concur.
