I have two tables apps and builds apps app_guid name state created_at updated_at foundation builds guid app_guid app_name state created_at updated_at foundation One app can have multiple builds, …
Tag: sql
How to aggregate data by SQL?
I am not a SQL developer, but I need to make a request to sample the movement of accounts for the last month, aggregate information by client country. I could only create an sample database but I …
Oracle SQL – Sum and group data by daily, weekly and monthly. (With missing date, week, and month)
I need to get total amount of transactions group by daily, weekly and monthly. What i’ve tried gave me the result I expected but not giving the date or week or month if there is no transactions on the …
Get every 2 weeks on particular days SQL Server
I have a query getting the days in particular day that I selected and show the days in a month. My problem is that I need every two weeks of the month. And I also need to get long date format: dddd, …
Is it possible to create custom “Columns” in SQLAlchemy? is this breaking OOP?
I’m new in SQLAlchemy and I’m trying to understand some concepts. Here is a code example without SQLAlchemy: class Token: def __init__(self, key): # generate token based on a string …
How can i optimize the Trigger
I have checked a lot of Question asked Previously but was not able to get how do optimize this trigger ALTER trigger [dbo].[Expample] on [dbo].[AdminUsers] for update as begin declare @Id int …
SQL Server: hidden “Sort” inserted in execution plan in left join query
SQL 2017 Standard i have a database in a star schema model (data warehouse) to fill in a fact table, i have a stored procedure with a temporary table having around 470,0000 rows. to fill in the …
MySQL Workbench reports “is not valid at this position for this server version” error
For the following SQL query: SELECT CONCAT( customers.name, ‘ ‘, customers.familyname ) As Name, I receive the following error message: “SELECT” is not valid at this position for this server …
Returning values from a database with a Substring
Let’s say I’ve got 3 product description fields with the values AC-120 XXX, AC-120,CCC and AC-120 BBB. How would I get that information from a table using only AC-120 as my search argument? I’ve tried using the subStr function but that won’t return any values either Answer LIKE is very…
‘Could not extract ResultSet’ error when using nativeQuery in JPA
I’m using JPARepository in SpringBoot and using the @Query annotation but I get an error org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; …