V
V
Viktoria Smirnova2019-02-22 18:28:08
PostgreSQL
Viktoria Smirnova, 2019-02-22 18:28:08

SELECT name FROMM WHERE AND WHERE?

Sorry for the lamer question, I can't get a request of this type:

SELECT name, created_at 
FROM table 
WHERE name=0
AND extract(MONTH FROM created_at) = 02;

and the meaning is such that there is a sample of all names = 0 and created ONLY in the second month.
The example shows ALL names with 0 and created not only in the second month.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nozzy, 2019-02-22
@nozzy

What is this number 02?
Check what extract returns:

SELECT 
name, 
created_at,
extract(MONTH FROM created_at) 
FROM table 
WHERE name=0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question