---
title: "Gabriella Barajas (@gabbbybar) | Hashnode"
description: "Real Questions. Clean Answers. All About Databases. Read the latest articles by Gabriella Barajas on Hashnode."
url: "https://hashnode.com/@gabbbybar"
---

@gabbbybar

# Gabriella Barajas

@gabbbybar · USA · Joined July 2025

Real Questions. Clean Answers. All About Databases.

### [Custom Aggregate Function (to use with GROUP BY)](https://databasedev.hashnode.dev/custom-aggregate-function-to-use-with-group-by?utm_source=hashnode&utm_medium=feed)

Question: I'm wondering if it's possible to create a custom SQL group by function. For example, I often need to find the most common value within a group. While I can achieve this using CTEs or subqueries, having a custom group by function like the e...

2 min read · [databasedev.hashnode.dev](https://databasedev.hashnode.dev/custom-aggregate-function-to-use-with-group-by?utm_source=hashnode&utm_medium=feed)

[Jul 10, 2025](https://hashnode.com/posts/custom-aggregate-function-to-use-with-group-by/686fbfc9661b2396379371e5)

### [Update table according with JSON/JSONB](https://databasedev.hashnode.dev/update-table-according-with-jsonjsonb?utm_source=hashnode&utm_medium=feed)

Question: I have a table books : Name of columnType idint (PK) nametext nb\_pagesint And a table book\_modifications : Name of columnType idint (PK) old\_datajsonb new\_datajsonb book\_idint (FK) Now let's imagine I have a row in my...

2 min read · [databasedev.hashnode.dev](https://databasedev.hashnode.dev/update-table-according-with-jsonjsonb?utm_source=hashnode&utm_medium=feed)

[Jul 10, 2025](https://hashnode.com/posts/update-table-according-with-jsonjsonb/686fbe35e5d14f3197ab2e53)

### [Query run fast from MySQL CLI but very slow on R2dbcTemplate Code](https://databasedev.hashnode.dev/query-run-fast-from-mysql-cli-but-very-slow-on-r2dbctemplate-code?utm_source=hashnode&utm_medium=feed)

Question: Currently, I having a query SELECT al.category, IFNULL(jt.name, 'Ungrouped Devices') AS device\_group\_name, IFNULL(jt.id, '00000000-0000-0000-0000-000000000000') AS device\_group\_id, jt.color\_code AS color\_code, COUNT(\*) AS total FR...

3 min read · [databasedev.hashnode.dev](https://databasedev.hashnode.dev/query-run-fast-from-mysql-cli-but-very-slow-on-r2dbctemplate-code?utm_source=hashnode&utm_medium=feed)

[Jul 10, 2025](https://hashnode.com/posts/query-run-fast-from-mysql-cli-but-very-slow-on-r2dbctemplate-code/686fbb9e2c7602aed7687aaa)

### [How can I SELECT rows where a JSON key is bigger/smaller than a certain date?](https://databasedev.hashnode.dev/how-can-i-select-rows-where-a-json-key-is-biggersmaller-than-a-certain-date?utm_source=hashnode&utm_medium=feed)

Question: My table contains a value json-column: { "id":"string", "user":int, "history":{ "unixtimestamp":{ "progress":"string", "editorId":int }, "unixtimestamp":{ "progress":"s...

1 min read · [databasedev.hashnode.dev](https://databasedev.hashnode.dev/how-can-i-select-rows-where-a-json-key-is-biggersmaller-than-a-certain-date?utm_source=hashnode&utm_medium=feed)

[Jul 10, 2025](https://hashnode.com/posts/how-can-i-select-rows-where-a-json-key-is-biggersmaller-than-a-certain-date/686fb4d6ab9e7eca848478c7)

### [How to simulate a deadlock on a row in MySQL?](https://databasedev.hashnode.dev/how-to-simulate-a-deadlock-on-a-row-in-mysql?utm_source=hashnode&utm_medium=feed)

Question: To simulate a lock in mysql I can grab the row with the following: BEGIN; SELECT \* FROM table WHERE id=1 FOR UPDATE; Now, if I try and update that row (from another connection) it will raise the following error after innodb\_lock\_wait\_timeo...

2 min read · [databasedev.hashnode.dev](https://databasedev.hashnode.dev/how-to-simulate-a-deadlock-on-a-row-in-mysql?utm_source=hashnode&utm_medium=feed)

[Jul 10, 2025](https://hashnode.com/posts/how-to-simulate-a-deadlock-on-a-row-in-mysql/686fb3561b5c472f1cb5dd12)
