I want to join the values of 2 tables date for specific minutes . say data join for same date but hours can be + or – 10 minutes in difference. select * from table1 inner join table2 where table1….
Tag: sql
Dynamic Extraction of text – SQL
I have a column with values in the following format: Successfully refunded 1 units of product 11111111 Successfully refunded 1 units of product 22222222 Successfully refunded 1 units of product …
Postgresql: Unique constraint over Union of 2 columns
I have the following tables: TRANSACTIONS id | amount —————— 1 | 100 2 | -100 3 | 250 4 | -250 TRANSACTION_LINKS id | send_tx | receive_tx ————…
how to retrieve latest data from a table
Currently I am working on a project where I need to extract latest data from a table for a report purpose. Below is the sample table structure:- Every student has several courses and course_id for …
How to get combined values from a table in hive
Have a table in Hive with a following structure: col1 col2 col3 col4 col5 col6 —————————– AA NM ER NER NER NER AA NM NER ERR NER NER AA NM NER NER TER …
Graphql, node.js and sql,Cannot return null for non-nullable field
I want to return data coming from db to the api. The data is being logged but not showing on the graphql api. RESULT: OUTPUT: Answer This is your resolver: A GraphQL resolver must return either a value or a Promise that will resolve to a value. However, here, you’re not returning either. Keep in mind th…
How to log failed sql in hibernate?
I’m building a SpringBoot application with spring-data-jpa. I know how to log all sqls from this question. How to print a query string with parameter values when using Hibernate But what if I only want to log failed sqls? Answer There are two options: Configure sql logging with parameter values. Disable…
How to create indexed view of children count
I am trying to take a table with a parent child relationship and get the number of children. I would like to create an indexed view of the number of children by utilizing COUNT_BIG(*). The problem is …
Count Most donator SQL
I wanted to know how would i count most donated number for a person and how to make list from most donator to the lowest. Database looks like this : – Donated Amount – Payer Email – 10 123456@…
Grouping database entries into dynamic HTML tables
I have a database where teams will have multiple entries each with different locations. Each entry will have a team name. So for example, team1 might appear several times but each time the location …