Skip to content

Group similar URLs

I am looking to fetch all requests to xmlrpc.php and wp-login.php and have them wildcarded in the statement. But this presents an issue, as it doesn’t output the data in only two rows for xmlrpc and …

Extracting integer ID from URL in SQL

Given a url like https://xyz.abc.yahoo.com/issues/80483987/tasks/1 How can write a SQL query to replace/extract urls like this with their integer ID that is 80483987 Using REGEXP_REPLACE(mystr, r'[^…

T-SQL – Get customized row when it exists

We have a table where we keep rows with vanilla settings for products, and customized rows per product per customer as they see fit to override. When a customer does not override, the vanilla rows …

Coalesce with a conditional expression

The following query works when executed in SequelPro: SELECT * FROM friend_computer LEFT JOIN computer m ON computer_id = m.id LEFT JOIN computer_status ms ON m.id = ms.computer_id JOIN …