📄
EBIS3003-2021
  • Introduction to the Course
  • Preliminaries
    • donorschoose.org
    • Installing Software
    • Sequel Pro Local Access
    • Import donorschoose.org Data to MySQL Server
    • MySQL Setting for Client Software
  • SQL
    • Class Activity 2 - Creating New Tables (Week 2)
    • Inserting Table
    • Select / Functions
    • Grouping
  • PYTHON
    • Installing Anaconda
    • Running Jupyter Notebook
    • Connecting MySQL via Python
  • Assignments
    • In-class Activity - ER (Week 5)
    • Homework Assignment 1
      • Solutions
    • Homework Assignment 2
    • In-Class Activity - Python (Week 11-12)
    • In-Class Activity - Normalization (Week 14)
Powered by GitBook
On this page

Was this helpful?

  1. SQL

Select / Functions

Task 1: Count the number of projects where the project is completed.

mysql> SELECT COUNT(*) FROM projects_kick WHERE completion = 1;
  • Note the use of *.

  • Note the use of a function.

  • And the condition.

Task 2: Count the number of projects that are created by creator 1 AND the requested budget is larger than 1,000.00.

mysql> SELECT COUNT(*) FROM projects_kick 
        WHERE creator_id = 1 
        AND total_amount > 1000;

Note the use of multiple conditions.

PreviousInserting TableNextGrouping

Last updated 4 years ago

Was this helpful?