Difference between revisions of "DD Class11"

esse quam videri
Jump to: navigation, search
(Sql Functions)
(Sql Aggregate Functions)
Line 12: Line 12:
 
Aggregate functions are determinate. They will return the same value given the same dataset.
 
Aggregate functions are determinate. They will return the same value given the same dataset.
  
AVG
+
*AVG
MIN   
+
*MIN   
CHECKSUM  
+
*CHECKSUM  
SUM   
+
*SUM   
CHECKSUM_AGG  
+
*CHECKSUM_AGG  
STDEV   
+
*STDEV   
COUNT  
+
*COUNT  
STDEVP   
+
*STDEVP   
COUNT_BIG  
+
*COUNT_BIG  
VAR   
+
*VAR   
GROUPING  
+
*GROUPING  
VARP   
+
*VARP   
MAX  
+
*MAX  
  
 
<sql>
 
<sql>

Revision as of 03:49, 11 April 2007


Review Data Diagram for final

  • are they normal?
  • can the design acomplish your goals?
  • are they over engineered?

Sql Aggregate Functions

They perform a calculation on a set to values and return a single value. Aggregate functions are determinate. They will return the same value given the same dataset.

  • AVG
  • MIN
  • CHECKSUM
  • SUM
  • CHECKSUM_AGG
  • STDEV
  • COUNT
  • STDEVP
  • COUNT_BIG
  • VAR
  • GROUPING
  • VARP
  • MAX

<sql> SELECT MAX(PricePerPound) as MaxPrice from CheesePrice

SELECT AVG(PricePerPound) as AvgPrice from CheesePrice

SELECT COUNT(CheeseID) as Count from CheesePrice </sql>

Sub Query

Course adder example

http://iam.colum.edu/dd/classsource/class8/student.aspx

SQL Subquery

<sql>SELECT CourseID, CourseName, CourseNumber FROM Course WHERE (

  CourseID not in 
  (
     SELECT CourseID FROM StudentsCourses_vw WHERE StudentID = @StudentID
  )

) </sql>

Uploader/Email

Mappath

Server.Mappath

upload permissions

HomeWork

Web Skeleton of your site

Demostate one feature