Showing posts with the label sql

[FIXED] Get count orders from previous week and substract for this week sql

Issue Hello I had an sql getting the number of orders this week. My sample query below: SELECT pro…

[FIXED] Running a MySQL seed file in node js

Issue Summary I have a schema file I use to set up my database and a href="https://github.co…

[FIXED] drop primary key giving error saying it doesn't exist but won't allow me to add since it says one alraedy exists

Issue I have a mysql table: +---------+--------------+------+-----+---------+-------+ | Field | …

[FIXED] Is it possible get data with search data between values

Issue I am having data in table USER_TABLE as following : +-----------------+ | USERS_RANGE | …

[FIXED] How to UNION ALL specific tables based on a Parameter condition

Issue Say I have a global parameter param_filtered where the value can be 0 or 1, and i have alrea…

[FIXED] Springboot getting results via two parameters error

Issue I'm trying to get a count of results from a table based on two results, user_id and quiz_…

[FIXED] Update a value in a row that is related to another row based on a group ID

Issue I need to copy one value of a row to another by using its symbol (group id). Another row is d…

[FIXED] Update the column Date` with the date less than two months using MySQL

Issue This is my table MySQL 5.5.62 host version class="s-table"> uID Next_contro…

[FIXED] MySQL: How to get hourly value w.r.t date

Issue I was able to do this but I want to narrow down to a certain date only: select count(*) as t…

[FIXED] How to omit html tags in a mysql table attribute while doing a select

Issue I have a table where each row consist of an attribute which consist of html data with like th…

[FIXED] Extract data using SQL in JSON format grouping by timestamp

Issue I have a legacy MariaDB database that saves the historical data of our temperature and humidi…

[FIXED] SQL Server 2019 - Update Table by JSON Array of object

Issue I have a table like this: CREATE TABLE WeeklySlots ([dow] int, [slots] int, [SlotCode] v…

[FIXED] Selecting unique values of keys inside postgresql json field

Issue I have the following model: Shipment: reference_numbers: [] :json field reference field…

[FIXED] sql query or django filter for string

Issue hello i need a query that search in database and return a row that has most similarity from s…

[FIXED] Right outer join with multiple where conditions

Issue I'm having some issues returning any results from my SQL query. I'm pretty sure it…

[FIXED] Store int, float and boolean in same database column

Issue Is there a sane way of storing int, float and boolean values in the same column in Postgres? …

[FIXED] Declare var in other macro to be used in a different macro for DBT

Issue The main idea is to have a constant variable and then have the possibility to use it in other…

[FIXED] How to use expressions in if statements in DBT

Issue I want to know how, if possible, I can use dbt expressions that are enclosed in two curly bra…

[FIXED] DBT - Use dynamic array for Pivot

Issue I would like to use DBT to pivot a column in my BigQuery table. Since I have more than 100 v…

[FIXED] STRING_AGG aggregation result exceeded the limit of 8000 bytes error

Issue I need to combine texts by group. I found a function called STRING_AGG . select c.id , c.ber…