0
0
Redisquery~10 mins

ZINCRBY for score updates in Redis - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to increase the score of member 'player1' by 10 in the sorted set 'game_scores'.

Redis
ZINCRBY game_scores [1] player1
Drag options to blanks, or click blank then click option'
AINCRBY
Bplayer1
Cgame_scores
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the member name where the increment should be.
Using the key name instead of the increment.
2fill in blank
medium

Complete the code to increase the score of member 'user42' by 5 in the sorted set 'leaderboard'.

Redis
ZINCRBY [1] 5 user42
Drag options to blanks, or click blank then click option'
A5
Bleaderboard
Cuser42
Dscoreboard
Attempts:
3 left
💡 Hint
Common Mistakes
Using the member name instead of the key name.
Confusing the increment value with the key.
3fill in blank
hard

Fix the error in the command to increase 'memberX' score by 3 in 'scores'.

Redis
ZINCRBY scores [1] memberX
Drag options to blanks, or click blank then click option'
AmemberX
Bscores
C3
DINCR
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the member name where the increment should be.
Using a keyword instead of a number.
4fill in blank
hard

Fill both blanks to increase 'alice' score by 7 in the sorted set 'players'.

Redis
ZINCRBY [1] [2] alice
Drag options to blanks, or click blank then click option'
Aplayers
B7
C7.0
Dplayer_scores
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the key and increment.
Using a float number instead of an integer.
5fill in blank
hard

Fill all three blanks to increase the score of 'bob' by 4.5 in the sorted set 'game_rankings'.

Redis
ZINCRBY [1] [2] [3]
Drag options to blanks, or click blank then click option'
Agame_rankings
B4.5
Cbob
Drankings
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of arguments.
Using an integer instead of a decimal when decimal is needed.