How to filter records by them amount per date?

i have a tablet 'A' that have a column of date. and the same date can be in a few records. I'm trying to filter the records where the amount of the records by day is less than 5. And still keep all the fields of the tablet. I mean that if i have onl...
more »

2017-11-10 01:11 (2) Answers

How do you make SQL return duplicates?

When running an SQL such as the following; SELECT * FROM items WHERE item_name IN ('fish', 'frog', 'fish') I get 1 frog, and 1 fish. This is expected and normal behaviour, as the WHERE clause no doubt evaluates against each row in the database ind...
more »

2017-10-30 01:10 (3) Answers

How to perform Left Outer Join in Django ORM ?

I have the following models: class CandidateDetail(models.Model): full_name = models.CharField(max_length=128, null=True) email_id = models.CharField(max_length=64, null=True) created_at = models.DateTimeField(auto_now_add=True) modi...
more »

2017-10-27 08:10 (1) Answers

docker swarm database connection reset by peer

I am running a spring boot application with docker swarm and I use postgres for database. When I run both of them as docker service, database connection fails consistently and randomly (as you can see on the timestamp) as the log says: 2017-10-26T17...
more »

2017-10-26 20:10 (0) Answers

Postgresql recursive count records dynamically

I am trying to count the records from a table of events records having close time intervals between event times and sharing the same criteria for other columns to detect the first occurrence event time and last cease time for each flapping event I a...
more »

2017-10-24 11:10 (0) Answers