So I have metrics that look like this. And here is my dumb question… Does the rw i/o directly correlate to rw query? Using the example below, does that mean there was increased read query activity? I don’t have some flags enabled yet to have metrics on the transaction level, but i’ll eventua…
Tag: sql
How to join two tables where Columns are not matching in SQL
I have two different tables and in the select query I need to bring the SUM of the other column but both the tables have some similar data but still in the query output values are not coming fine. I am using below query :- Query 1 Query 2 Query 1 output COUNTRY BUDGET_SALES MY 20463355.16 SG 41095952.67 Query…
Query to calculate “trailing twelve-month sum(column)” for 100s of dates in one query?
I have this table: Dividends History Table I’m trying to figure out the most efficient way to get: One row for each date Each row contains the sum(dividends_received_value) for the past year of data relative to the date in that row (“trailing twelve months”) Can this be done purely in SQL? I…
PostgreSQL create index on JSONB[]
Consider a table defined as follows: How can I create an index on json key type and how can I query on it? Edit: Previously, there were no indexes on json keys and select queries used an unnest operation as shown below: The problem is, if the table has a large number of rows, the above query will not only
SQL Like and Wildcard with Oracle SQL Developer
I am using SQL Developer over a backend Oracle DB. I have a record where the buyer name is Pete Hansen. Why I try I get the result, no problem. However, when I use the following, I do not get any results: Also, when I try the following, I do not get any results but the following works well: Could
Separate “Mr John Joe Smith” into “Mr” “John” “Joe” “Smith”
A file supplied by a Client has the following structure: FullName Mr John Joe Smith They would like this transformed to the following: Salutation FirstName MiddleName LastName Mr John Joe Smith I’ve looked into this and I’ve tried the following: This produces: Salutation FirstName Mr John Joe Smit…
SQL Query to Find if (Count of date > X) = 0 For Group of ID
I apologize if the title is not be correct as I’m not sure what I need to ask for, since I don’t know how to build the query. I have the following query built to return a list of chemicals and other related fields. I am using this query in a VB.Net application where it exports the results to an
Calculate amount of days worked by employee from 1 column to another with a function
This is my function I have so long, I need to be able to just call it with with an Employee number from the Employee table and it has to calculate the days between the 2 columns. If there is a better way please let me know, this is what I have… Answer Presumably, you want something related to the
How to import a JSON file into postgresql databse?
I just tried to read a .JSON file in my PostgreSQL database but it is not able to read it. I did it with a .csv file, but with a .JSON file, I am not able to do it. This is how the .JSON file looks like: This is the code that I tried, I created the table first and
How to get partial string in oracle
I need to find all the users in the table that have this pattern I only know the first 10 digits, the email address can be different. I did something like this, but I get nothing back Is there another way that I can capture this data in oracle? Thank you! Answer More a comment that a real answer, but