I am trying to use a case select for a $ pay field. If the field is 0.00 then i want the decimal formatted as a blank fill of length 10 0's else give me the dec
I have a database where I store all transactions made in a game (picture of DB). Now I want to get the value of the last transaction for each player. I already
I have a BigQuery table ("activity") where one column ("groups") contains a JSON value (the table is an export of Google Workspace logs). I'd like to be able to
create view comb as select * from dept d join dept_part p on d.dept_name = p.dept_name; Error Message as "Duplicate column name: dept_name"
SELECT DISTINCT DEL.BABY_ID, DEL.MOTHER_ID, MIN(DEL.CHECK_VISIT_DATE) OVER (PARTITION BY DEL.MOTHER_ID) AS Del_FIRST_DATE, (DEL.CHECK_VISIT_DATE)
How do I simply group by a 24 hour interval from 7am to 7am in a manner similar to: select format(t_stamp,'yyyy-MMM') from mytable group by format(t_stamp,'yyyy
I want to run Bonferroni P Adjusted Value Test on a stacked data set. This is my code: stat.2 <- stack.2 %>% group_by(modules) %>% t_test(values ~ phen
I'm trying to set variable in order to make further operation. But when I set my first variable on line 2 ("SET(new_user)=( "), I get an error Query error: Can
This is my first time connecting to a Firebird database from Node JS. I'm using the "node-firebird" package. Everything seems to work fine. But I get these <
First things first, I'm new to the forum, anything I write that isn't concise or just flatt out adjective let me know! I'm developing an app that can retrieve d
I am using PostgreSQL 9.4 and I have a requirement to have an 'addresses' array which contains closed JSON objects for different types of address (residential a
I would love some help with a query to expand an Access Table I'm working with. I need to generate a range between the min and max numbers and then duplicate th
I have the following table of orders for users like the following: CREATE TABLE orders ( order_id UUID, user_id UUID, date date,
I have a query that looks like this: SELECT ordDetails.OrderId FROM orders.OrderDetail ordDetails WHERE ordDetails.Class <> 'O' GROUP BY ordDetails.
There are 2 tables ost_ticket and ost_ticket_action_history. create table ost_ticket( ticket_id int not null PRIMARY KEY, created timestamp, staff bool, statu
I would like to make a stored procedure in SSMS that will truncate a table that has foreign keys. Here is what I have right now but when I pass a table with for
I have a requirement to create a room reservation system with dynamic booking slots (a reservation can start at any time and last anywhere from 15 minutes up to
I'm looking for an easier way to do this. My current code is written as below: CASE WHEN LENGTH(CAST (MTH AS VARCHAR(4))) = 1 THEN CAST(CAST (YR AS VARCH
Given a year and a quarter, a procedure should INSERT values into table tb_quarter, which is empty and have this structure: CREATE TABLE erp.tb_quarter (
This was a question asked in a BI Engineer interview. I could not solve it and still scratching my head around it. Although, I used lag window function using ca