I want to order records with associated records in GORM V2. I have two structs: type Client struct { gorm.Model UUID uuid.UUID `gorm:”type:uuid”` ClientProfile …
How to set nested path values in the tree structure?
In our database, a tree structure is implemented like this: name path pos_left pos_right pos_level folder1 207 214 1 file1 208 …
How to insert multiple values with popup LOV in Oracle APEX?
I want to find a way to insert multiple values in a link table, for that I use popup LOV item, using this item users can choose multiple values. And I want to insert that values to link table. I tried …
SQL Max count for each group
I’m having trouble calculating a max count for each value in a column (Year_month). The business question is: for each Year_month, which Week_day has the highest number of records. Trying to list the …
Get Current date, current month, current year depending on user selection – SQL stored procedure
I have a stored procedure that gives results depending on multiple values from the User(filtering), in my query I have 2 date columns date_start and date_end, I want to allow the user to return data depending on his selection from 2dropdownmenu one for start date and the other for end date as this: (this day …
MySql trigger to replace text
everybody! I have a trigger to replace text BEFORE INSERT to table, i have a text in which need change one word SET NEW.shipping_method = CASE WHEN NEW.shipping_method LIKE ‘weight’ THEN ‘Svars’ ELSE …
Stop BigQuery from truncating output
I need to export a query into a json using the bq cli (on bash b.t.w.) I am using this command: bq –format=json query –use_legacy_sql=false ‘SELECT text FROM `..<…
Union of 4 tables with same column types (but different data) order by max time in AWS Athena?
I’m having an issue I have 4 tables that look like this: device volume1 volume2 time device_id x y time_devicemessage Each table is for one single device so I have 4 devices, which send messages in …
Node app wainting for localhost permantly
I’m new to node.js, im trying to make a simple login form, i have a database with the users and passwords, this is the action asigned to the form: app.post(‘/auth’,async(req, res) => { …
How to return AVG by date and by user [closed]
I need to perform a task that is quite complicated for me, I need to return the average number of records entered by users per day. Lets say that i have this table +—-+–+—+——–+—————…