I have an existing table (jobCost) that has cost data by type and month as shown in the example here. Job Month Material Labor Equip 123 01/1/22 50.00 25.00 75
I want to fetch records from the database as : select * from table where column1 IN (aa, bb , cc...) and column2 IN (34, 55, 66...) and column3 IN(df, fg, hh...
When I run my query, only one of my rows is displayed. I also need to create a database diagram from these 3 tables Can someone please assist me on how to do th
I am currently using Advantage database. I have a table with hundreds of headers. How do I use query to find a specific column name? Example - I am looking for
I keep getting an exception that reads: "Invalid Column Name, 'IBM'." The error is happening at: "' + @ticker + '" even though @ticker is declared in VALUES.
Using Teradata.. I want to write a query that joins table 1 and table 2 on item code to the location in table 2. There are multiple locations per item code and
Lets start with a basic SQL statement like this: SELECT CustomerName, City, Country FROM Customers; We get something like this: CustomerName City Country Alex
I am trying to create a json object from my query using json_build_object as follows: Select json_agg(json_build_object('first_name',first_name,
The following code: SELECT ets.event_id, ets.event_date, dtn.don_date, dtn.don_date - ets.event_date AS date_diff FROM events ets, donation dtn GROUP BY ets.eve
I have a call dataset. Looks like this If a call about a certain member comes in within 30 days of an "original call", that call is considered a callback. I ne
I am trying to add a calculated column that computes a rolling average of a sorted partition. I can make it work as a query but cannot seem to get the result to
I am struggling to create the correct prefetch behavior in Django. Here is the outline of the problem: Each Account has DailyQuotes, updated daily at different
DB Fiddle: https://www.db-fiddle.com/f/u1N4YYV3wmiWndnZNb95xz/5 For the following tables nodes and leaves, with nodes having just 9 records and leaves having a
Table def: CREATE SEQUENCE IF NOT EXISTS lazy_product_stock_id_seq; CREATE TABLE "public"."lazy_product_stock" ( "id" int4 NOT NULL DEFAULT nextval('lazy_pr
I solved this issue with the code below in my build.gradle allprojects { configurations.all { resolutionStrategy { force 'org.xerial:sqlite-jdbc:3
I have a set of data for some tickets, with datetime of when they were opened and closed (or NULL if they are still open). +------------------+-----------------
I have 2 tables: google_analytics and marketing_costs. How can I join these 2 columns (google_analytics['source'] with marketing['medium']) even tho they don't
I'm going to migrate data from PostgreSQL database to Yandex's ClickHouse. One of the fields in a source table is of type JSON - called additional_data. So, Pos
I'm trying to run the weighted moving average Silota query with similar data in a Presto database but am encountering an error. The same query in the Redshift d
I have a table. There is data in this table and there is a checkbox next to each data. Multiple selection is possible. After the user makes a selection, the id