ZINTERSTORE

Since 1.1.0Sorted sets

Syntax

ZINTERSTORE destination numkeys key [key ...] [WEIGHTS ...] [AGGREGATE SUM|MIN|MAX|COUNT]
  • Flags: movablekeys, write
  • ACL categories: @slow, @sortedset, @write
  • Arity: -4

Stores what ZINTER would return at destination, replacing whatever was there.

Reply

  • The number of members stored.

Examples

> ZADD s1 1 a 2 b 3 c
(integer) 3
> ZADD s2 10 b 20 c 30 d
(integer) 3
> ZINTERSTORE out 2 s1 s2
(integer) 2