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
Using ROLLBACK The ROLLBACK statements end the present transaction and undo any change made during the transaction. The Rolling back is helpful for two reasons. Firstly, if yo

Defining REF CURSOR Types To make cursor variables, you take 2 steps. At first, you define a REF CURSOR type, and then declare the cursor variables of that type. You can defin

LOB Types The large object (LOB) datatypes like BFILE, BLOB, CLOB, and NCLOB store the blocks of unstructured data (like graphic images, text, video clips, and sound waveforms)

Using EXTEND To enlarge the size of a collection, use EXTEND. This process has 3 forms. The EXTEND appends one null element to a collection. And the EXTEND(n) appends n null e

Parameter SELF in pl/sql The MEMBER methods recognize a built-in parameter named SELF that is an instance of the object type. Whether declared explicitly or implicitly, it is

Using a Join on 2 tables, select all columns and all rows from the tables without the use of a Cartesian product. Query: SELECT * FROM EMPLOYEE1 JOIN CONTRACT ON EMPLOYEE

Explicit Cursors The set of rows returned by the query can include zero, one, or multiple rows, depending on how many rows meet your search criteria. Whenever a query returns

Question: (a) The objective of query optimization is to choose the most efficient strategy for implementing a given relational query, thereby improving the system performance. On

Using SET TRANSACTION You use the SET TRANSACTION statement to begin the read-only or read-write transaction, start an isolation level, or assign your present transaction to a