Зміст курсу
Introduction to SQL
Introduction to SQL
2. Filtering Data
The WHERE ClauseChallenge: Help a Reader Find Their Favorite GenreChallenge: Fetching Older BooksConditional Expressions: Comparison OperatorsChallenge: Avoid the Damaged BooksChallenge: Highlight New ArrivalsChallenge: Budget-Friendly BooksConditional Expressions: The AND OperatorChallenge: Find Specific Books for a ReaderChallenge: Defining RangesChallenge: Multiple ConditionsConditional Expressions: The OR OperatorChallenge: Matching Multiple OptionsChallenge: Excluding A RangeConditional Expressions: The NOT OperatorChallenge: Negating a Range
3. Sorting Data
Basic SortingChallenge: Sorting the Library CatalogueSorting by Multiple ColumnsChallenge: Further Sorting the CatalogueSorting after Filtering DataChallenge: Find the Cheapest BooksChallenge: Help a Customer Find a BookThe LIMIT KeywordChallenge: Select Books for the Collector's SectionChallenge: Affordable Books
4. Populating a Database
Creating a TableChallenge: Creating a new Books TableInserting Rows into a TableChallenge: Inserting DataChallenge: Inserting More DataInserting Multiple RowsChallenge: Inserting Bulk DataPrimary KeysThe SERIAL KeywordChallenge: Changing the Books StructureSpecifying Default ValuesChallenge: Further Improving the Books Table
5. Updating & Deleting Data
Challenge: Changing the Books Structure
Your manager has decided that the books_table
table should have an auto-incrementing book_id
to uniquely identify each book. Additionally, the book_id
will be set as the primary key for the table.
Завдання
Swipe to show code editor
You are tasked with recreating the books_table
table with the following columns:
book_id
- The unique id of the book (SERIAL
),PRIMARY KEY
;title
- The title of the book (VARCHAR
, max-length255
),NOT NULL
;author
- The author of the book (VARCHAR
, max-length100
);genre
- The genre/category of the book (VARCHAR
, max-length50
);published_year
- The year the book was published (INTEGER
);isbn
- The International Standard Book Number (VARCHAR
, max-length20
);publisher
- The publisher of the book (VARCHAR
of max-length100
);pages
- The number of pages in the book (INTEGER
);language
- The language of the book (VARCHAR
of max-length50
);is_available
- Whether the book is available for lending (BOOLEAN
);
Рішення
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 4. Розділ 10
Challenge: Changing the Books Structure
Your manager has decided that the books_table
table should have an auto-incrementing book_id
to uniquely identify each book. Additionally, the book_id
will be set as the primary key for the table.
Завдання
Swipe to show code editor
You are tasked with recreating the books_table
table with the following columns:
book_id
- The unique id of the book (SERIAL
),PRIMARY KEY
;title
- The title of the book (VARCHAR
, max-length255
),NOT NULL
;author
- The author of the book (VARCHAR
, max-length100
);genre
- The genre/category of the book (VARCHAR
, max-length50
);published_year
- The year the book was published (INTEGER
);isbn
- The International Standard Book Number (VARCHAR
, max-length20
);publisher
- The publisher of the book (VARCHAR
of max-length100
);pages
- The number of pages in the book (INTEGER
);language
- The language of the book (VARCHAR
of max-length50
);is_available
- Whether the book is available for lending (BOOLEAN
);
Рішення
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 4. Розділ 10
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів