Skip to content

Instantly share code, notes, and snippets.

@phntm7
phntm7 / redis-movekeys.sh
Created January 31, 2020 13:48 — forked from jdp/redis-movekeys.sh
Move keys matching pattern from one database to another
#!/bin/sh
#
# Usage: ./redis-movekeys.sh [-h host] [-p port] [-n src] [-m dest] pattern
#
# Move keys matching pattern from the src Redis database to the
# dest Redis database.
set -e
HOST="localhost"
@phntm7
phntm7 / 1a.sql
Last active July 10, 2019 16:56
SQL Test
SELECT f.Name, ANY_VALUE(COALESCE(p.Phone, '-')) AS Phone FROM Firms f
LEFT JOIN Phones p ON p.FirmID = f.ID
GROUP BY f.ID