File Edit View Navigate Code Befactor Run Tools Git Window Help postgres@localhost [3] Database = -113333.sql postgres@localhost [3] + ©GA 8 = » R _ { • » @ < • • 540 * ? postgres@localhost 2 of 4 postgres@localhost [2] 2 of 5 postgres@localhost [3] 3 of 7 class 1 of 3 public ✓tables 6 > adreeses > > > > > I > sequences 6 Database Objects ✓ public customer_phones customers orders phone types products > access methods 7 > casts 229 > extensions 1 >languages 4 postgres 1 of 3 shoppingdb 0 of 3 No schemas selected Database Objects > access methods 2 Services >casts 229 > extensions 1 >languages 4 Server Objects Tx I ÷ {{ M + products name varchar(512) stock cost real real unit price real product_id integer postgres@localhost [3] ✓ console 3s 171 ms 113333.sql 44 ms product_id Powered by yFiles data1-postgres@localhost [3] customer_id orders customer id integer product_id integer quantity integer datetime timestamp order id bigint customers first name varchar(100) middle name varchar(100) last name varchar(100) birth date is active customer_id customer_id date boolean integer customer_id adreeses customer_id integer description varchar(256) postal code integer city varchar(100) adress_id integer 1 phone_types description varchar(100) phone_type_id integer K

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

Hi

i have to get the total  orders from phone id 

And average orders from the posta code  

Can you write data base codes to get this information

DG File Edit View Navigate Code Refactor Run Tools Git Window Help data1 - postgres@localhost [3]
postgres@localhost [3]
Database Explorer
Bookmarks
Database
+ 0 G
postgres@localhost 2 of 4
postgres@localhost [2] 2 of 5
postgres@localhost [3] 3 of 7
class 1 of 3
✓ public
✓ tables 6
>
>
>
>
>
> customer_phones
>
>
>
products
sequences 6
>
✓ Database Objects
>
>
✓ public
>
>
adreeses
customers
orders
extensions 1
languages 4
postgres 1 of 3
"
phone_types
shoppingdb 0 of 3
No schemas selected [...]
✓ Database Objects
Services
access methods 7
casts 229
✿
= » KE?
extensions 1
> languages 4
Server Objects
access methods 7
casts 229
Tx = = = A +
✓postgres@localhost [3]
console 3 s 171 ms
Sa 113333.sql 44 ms
Version Control
12°C
Kısmen güneşli
TODO
SO 113333.sql
1:1
postgres@localhost [3]
products
name varchar(512)
stock
cost
real
real
unit_price real
product_id integer
Powered by yFiles
product_id
自行L S*?
→ Problems ▸ Services
orders
customer_id integer
product_id integer
quantity integer
datetime timestamp
order_id bigint
customer_id
customers
first_name varchar(100)
middle_name varchar(100)
last_name varchar(100)
birth_date
is_active
customer_id
customer_id
date
boolean
integer
customer_id
adreeses
customer_id integer
description varchar(256)
postal_code integer
city varchar(100)
adress_id integer
▬▬
▬▬▬▬
> Output
K
1
phone_types
description varchar(100)
phone_type_id integer
phone_type_id
customer_phones
< 1 row ✓
O Search
customer_id
integer
phone_type_id integer
phone
char(15)
customer_phone_id integer
count(*): bigint
Ç
count =
Ⓡ
▼
Add Configuration...
CSV v
ENG
B
4) O
0
CPU 1%
GPU 15%
VRAM 0%
RAM 73%
FPS --
±F © ☀
11:00 ص
⠀
T.TT/T/-V
Structure Notifications
2
Transcribed Image Text:DG File Edit View Navigate Code Refactor Run Tools Git Window Help data1 - postgres@localhost [3] postgres@localhost [3] Database Explorer Bookmarks Database + 0 G postgres@localhost 2 of 4 postgres@localhost [2] 2 of 5 postgres@localhost [3] 3 of 7 class 1 of 3 ✓ public ✓ tables 6 > > > > > > customer_phones > > > products sequences 6 > ✓ Database Objects > > ✓ public > > adreeses customers orders extensions 1 languages 4 postgres 1 of 3 " phone_types shoppingdb 0 of 3 No schemas selected [...] ✓ Database Objects Services access methods 7 casts 229 ✿ = » KE? extensions 1 > languages 4 Server Objects access methods 7 casts 229 Tx = = = A + ✓postgres@localhost [3] console 3 s 171 ms Sa 113333.sql 44 ms Version Control 12°C Kısmen güneşli TODO SO 113333.sql 1:1 postgres@localhost [3] products name varchar(512) stock cost real real unit_price real product_id integer Powered by yFiles product_id 自行L S*? → Problems ▸ Services orders customer_id integer product_id integer quantity integer datetime timestamp order_id bigint customer_id customers first_name varchar(100) middle_name varchar(100) last_name varchar(100) birth_date is_active customer_id customer_id date boolean integer customer_id adreeses customer_id integer description varchar(256) postal_code integer city varchar(100) adress_id integer ▬▬ ▬▬▬▬ > Output K 1 phone_types description varchar(100) phone_type_id integer phone_type_id customer_phones < 1 row ✓ O Search customer_id integer phone_type_id integer phone char(15) customer_phone_id integer count(*): bigint Ç count = Ⓡ ▼ Add Configuration... CSV v ENG B 4) O 0 CPU 1% GPU 15% VRAM 0% RAM 73% FPS -- ±F © ☀ 11:00 ص ⠀ T.TT/T/-V Structure Notifications 2
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education