M
M
malkovan2019-11-16 18:15:04
PostgreSQL
malkovan, 2019-11-16 18:15:04

PostgreSQL query with filtering?

Hello.
Table for 10000 records. There is a model field, which contains the motorcycle model.
There are many records in the database with the same model.
How to make a request to return a list of models, but only unique ones, without repetitions?
For example, I make such a request, and 1000 records are returned, but only 70 of them are unique by model.
All the rest are records that differ, for example, in the date of sale of a motorcycle, but they have the same model.

SELECT%20model_name%20FROM%20bike%20WHERE%20marka_id=42%20AND%20eng_v%20BETWEEN%20$engVStart%20AND%20$engVEnd

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question