Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

databaseanswers.net Latest Questions

  • 0
Clara
Beginner

My database table looks like this: id articleId createDate modifiedDate content 1 145 01.01.2021 01.01.2021 blabla 2 145 01.01.2021 02.01.2021 blabla 3 145 01.01.2021 03.01.2021 blabla 4 146 02.10.2021 02.10.2021 blabla 5 147 05.04.2021 05.04.2021 blabla 6 147 05.04.2021 07.04.2021 blabla So if a content is updated and saved again, then it is saved again in DB with modified date and same articleId. What I’m try to get is all content (latest ,not repeated) ...

  • 0
Clara
Beginner

I have something like this… FlightNum Class Seats SoldOut 10 A 0 10 B 5 10 C 15 10 D 25 I want to write a statement where FlightNum is the same, and A class has 0 seats, all rows for that FlightNum should put a "1" in the SoldOut column. FlightNum Class Seats SoldOut 10 A 0 1 10 B 5 1 10 C 15 1 10 D 25 1 I’m not really ...

  • 1
Clara
Beginner

Let’s say I have following table "geo" Country Province City Netherlands Drenthe Assen Netherlands Drenthe Coevorden Netherlands Drenthe Emmen Netherlands Flevoland Biddinghuizen Netherlands Flevoland Biddinghuizen Netherlands Flevoland Biddinghuizen Netherlands Flevoland Biddinghuizen Belgium Antwerp Antwerp Belgium Antwerp Aartselaar Belgium Antwerp Boom I would like to query following output (return distinct county + province + number of times country is seeing in the table) Country Province Count Netherlands Drenthe 2 Netherlands Flevoland 2 Belgium Antwerp 1 so I can make it in 2 steps query country ...

  • 0
Clara
Beginner

Hey everyone Im having a trouble to understand why my result are different when im changing the group by from days to months ”’ SELECT U.USERNAME, COUNTER_MOVEMENTS.USER_BUNDLE_ID,COUNTER_MOVEMENTS.USER_ID,COUNTER_MOVEMENTS.PAYMENT_CURRENCY,FROM_UNIXTIME(COUNTER_MOVEMENTS.CREATE_TIME-25200, '%m/%Y')AS SHORT_DATE ,COUNT(DISTINCT COUNTER_MOVEMENTS.USER_ID) AS COUNTER FROM `COUNTER_MOVEMENTS` INNER JOIN USERS U ON U.ID = ...