1. A plain query - PowerPoint PPT Presentation

About This Presentation
Title:

1. A plain query

Description:

from 'Inroll' as I, 'Students' as S. where S.'Sid' = I.'Sid' And S.'Department' = 'CS' ... I.'Sid' in (select 'Sid' from 'Inroll' where 'Cid' = 'CS4432'); Query Plan: ... – PowerPoint PPT presentation

Number of Views:13
Avg rating:3.0/5.0
Slides: 4
Provided by: defau1028
Learn more at: http://web.cs.wpi.edu
Category:
Tags: inroll | plain | query

less

Transcript and Presenter's Notes

Title: 1. A plain query


1
1. A plain query
  • SELECT "LastName", "FirstName"
  • FROM "Students"
  • WHERE "Department" 'CS'
  • Query Plan
  • Query plan text
  • "Seq Scan on "Students" (cost0.00..12.88 rows1
    width236)"
  • " Filter (("Department")text 'CS'text)"

2
2 A little complex query
  • select I."Cid",max("Grade")
  • from "Inroll" as I, "Students" as S
  • where S."Sid" I."Sid" And S."Department" 'CS'
  • group by I."Cid"
  • Query Plan

3
3. Nested Query
  • select "LastName", "Firstname"
  • from "Inroll" as I, "Students" as S
  • where S."Sid" I."Sid" and I."Cid" 'CS2223'
    and
  • I."Sid" in (select "Sid"
  • from "Inroll"
  • where "Cid" 'CS4432')
  • Query Plan
Write a Comment
User Comments (0)
About PowerShow.com