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
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5271313a-5a1f-4d07-82a4-8e8f0bce0b42%2F7cf36328-a6f1-4410-8c8e-689a5a3c5559%2F9uxih_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![Enhanced Discovering Computers 2017 (Shelly Cashm…](https://www.bartleby.com/isbn_cover_images/9781305657458/9781305657458_smallCoverImage.gif)
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![Enhanced Discovering Computers 2017 (Shelly Cashm…](https://www.bartleby.com/isbn_cover_images/9781305657458/9781305657458_smallCoverImage.gif)