DEFINITIONS

Definitions More Info.
Definition ID1.000
TitlePOSTGRESQL
CategoryNOTES
Definitionrow number ornek
Definition DescriptionSELECT * FROM (
SELECT ROW_NUMBER() OVER (PARTITION BY "PushNotificationMobileIdentifier"."UserId" ORDER BY "Id" DESC) AS "RowNumber","UserId","Id"
FROM "PushNotification"."PushNotificationMobileIdentifier"
WHERE "IsActive"='TRUE'
) k
WHERE "RowNumber" >3


;WITH "TOPLAM" ("Kullanici") AS
(
SELECT (COUNT("UserId"))-3
FROM "PushNotification"."PushNotificationMobileIdentifier"
WHERE "IsActive"='TRUE'
GROUP BY "UserId"
HAVING COUNT("UserId")>3
)
SELECT SUM("Kullanici") FROM "TOPLAM"
RecordBycunay
Record Date15-01-2020 11:24:47
Düzenle
Kopyala
Sil