SELECT only returns one record


#1

Hello,

it works perfectly with one key.

SELECT id, cnt FROM table KEYS IN 1155664;
cnt id
2,777.00 1,155,664.00

SELECT id, cnt FROM table KEYS IN 1179897;
cnt id
656.00 1,179,897.00

But when I try with multiple keys it returns only one record.

SELECT id, cnt FROM table KEYS IN 1155664, 1179897;
cnt id
2,777.00 1,155,664.00

Is there a way to return multiple records?

Thank you and best regards,
Artem


#2

Is this this with DynamoDB?


#3

@susodapop Yes it is.


#4

What happens when you do it this way:

SCAN id, cnt FROM table KEYS IN (1155664, 1179897);

#5

@susodapop

Thank you for your help,
I did execute it, but getting the same - only one record.

SCAN id, cnt FROM table KEYS IN (1155664, 1179897);

cnt id
2,777.00 1,155,664.00


#6

What happens if you use a regular where clause instead of the KEYS IN syntax?

SCAN id, cnt FROM table WHERE id IN (1155664, 1179897);

#7

@susodapop Thank you very much for your help.
It works perfectly.