select Customer_state,count(customer_id) as Customer_Count
group by CUSTOMER_STATE;
SUBSTR(c.CUSTOMER_PHONE,1,3)as area_code from CUSTOMERS c
group by substr(c.CUSTOMER_PHONE,1,3) ;
5r 1, SIMPLE Q UERIES IN SQL
Us) Find the address of MGM studios.
1E) Find Sandra Bullocks birthdate.
L Y 2) Find all the stars that appeared either in a movie made in 1980 or a movie
I l with Love in the title.
d) Find all executives worth at least $
222 CHAPTER 5. ALGEBRAIC AND LOGICAL QUERY LANGUAGES
.B .C VB V.C D
Figure 5.7: Result of a theta-outerjoin
5.2.8 Exercises for Section 5.2
Exercise 5.2.1 : Here are two relations:
R('A7B): cfw_(0,1)7 (273)7 (031)? (274)? (374)
$30): cfw_(0.1), (2.4). (2.
36 CHAPTER 2. THE RELATIONAL MODEL OF DATA
Example 2.7: In Example 2.6, the form of either Fig. 2.9 or Fig. 2.10 is
acceptable, because the key is a single attribute. However, in a situation where
the key has more than one attribute, we must use the style