Count operator in sql, PL-SQL Programming

Count Operator in SQL

Example: Counting the students who have scored more than 50 in some exam

(SELECT COUNT (*) FROM

(SELECT DISTINCT StudentId

FROM EXAM_MARK

WHERE Mark > 50) AS T)

Example is a direct translation of the corresponding example in the theory book but it can be abbreviated-and is much more likely to be written-as

(SELECT COUNT (DISTINCT StudentId )

FROM EXAM_MARK

WHERE Mark > 50)

Posted Date: 1/18/2013 6:04:40 AM | Location : United States







Related Discussions:- Count operator in sql, Assignment Help, Ask Question on Count operator in sql, Get Answer, Expert's Help, Count operator in sql Discussions

Write discussion on Count operator in sql
Your posts are moderated
Related Questions
What Are Cursor Variables  ? The Cursor variables are like C or Pascal pointers that hold the memory location (address) of some item rather of the item itself. Therefore, decl

Packages The package is a schema object which groups logically associated to the PL/SQL items, types, and subprograms. The Packages have 2 sections: the specification & the bod

Using PRIOR and NEXT The PRIOR(n) returns the index number that precede index n in a collection. The NEXT(n) returns the index number which succeed the index n. If n has no pr

LAWS / RULES - Dollo's Law                     :           Living organisms do exhibit evolutionary irreversibility or evolution is irreversible. Williston's Law

The Package Specification The package specifications contain the public declarations. The scopes of these declarations are local to your database representation and global to t

Find the account numbers of all customers whose balance is more than 10,000 $

Using a join on 3 tables, select 5 columns and 10 rows from the 3 tables without the use of a Cartesian product Query: SELECT E.LAST_NAME, E.FIRST_NAME, S.BUILDING, S.BRAN

Procedural Constraint Enforcement (Triggers) SQL has an alternative method of addressing database integrity, involving event-driven procedural code. The special procedures th

LONG and LONG RAW You use the LONG datatype to store the variable-length character strings. The LONG datatype is such as the VARCHAR2 datatype, except that the maximum length o

SELECT a.child_fname,a.child_lname,concat(b.parent_title,b.parent_fname), b.parent_lname,b.parent_tphone FROM child a,parent b WHERE a.parent_id=b.parent_id ORDER BY a.child_fnam