Home
Alexander Lu
Cancel

CS61A: Lecture 33

Aggregation So far, all SQL expressions have referred to values in a single row. Aggregation allows us to aggregate multiple rows together. Aggregation can be used in everywhere, bu...

CS61A: Aggregation

%load_ext sql %config SqlMagic.style = '_DEPRECATED_DEFAULT' %sql sqlite:///cs61a.db Aggregation Aggregation functions can be used to perform aggregation over multiple rows. Simple SELECT st...

CS61A: Tables

%load_ext sql %config SqlMagic.style = '_DEPRECATED_DEFAULT' %sql sqlite:///cs61a.db Joining Tables Queries may span over multiple tables, so we have to join multiple tables into one. ...

CS61A: Lecture 32

SELECT statements A SELECT statement specifies an input table using FROM [table] SELECT [columns] FROM [table] WHERE [condition] ORDER BY [order]; SELECT [expression] AS [name],...

CS61A: SQL

%load_ext sql %config SqlMagic.style = '_DEPRECATED_DEFAULT' %sql sqlite:///cs61a.db The sql extension is already loaded. To reload it, use: %reload_ext sql Databases Database Management S...

CS61A: Lecture 31

Databases Database management systems (DBMS) contains tables with records, which are rows that have a value for each column. Every table has columns and rows A column has a name...

CS61A: Macros

Macros Macros enable us to define new special forms within scheme. Macros perform code transformations. We describe how to take parts of a special form and construct a regular schem...

CS61A: Lecture 30

Quasiquotation We may extend Lisp as a language itself. We may change the language however we want. We may extend Scheme by adding more procedures to it, such as a for loop func...

CS61A: Programs as Data

Programs as Data Scheme programs consist of expressions that can either be primitive* or **combinations. The built-in Scheme list data structure (a linked list) is used to represent combinatio...

CS61A: Lecture 29

Programs as data A scheme expression is just a scheme list. Thus, we may use scheme to write scheme programs ourselves Built-in Scheme list data strucutre may represent combinations Ex: sc...