Given:-

When DML_OPeration is Insert "I" then B=0 When DML_OPeration is Delete "D" then B will hold the value of A of inserted record

Condition :-

1. if COUNT OF 'I' = Count of 'D', then we don't need those records. for example : ID=111
2. Find latest insert('I') DML_operation
```    ID  A   B   DML_Operation
1   111 1   0   I
2   111 2   1   D
3   111 3   0   I
4   111 4   3   D
5   111 5   0   I
6   111 6   5   D
7   111 7   0   I
8   222 8   0   I
9   333 9   0   I
10  333 10  9   D
11  444 11  0   I
12  444 12  11  D
13  444 13  0   I
14  111 14  7   D
15  333 15  0   I
16  444 16  0   I
17  444 17  13  D
```

Desire Output

```ID  A   B   DML_Operation
-------------
222 8   0   I
333 15  0   I
444 16  0   I
```

My logic which is not working

```sel ID, Max(A) from xyz
group by ID
having count(c='I') <> COUNT(c='D')
```

does you find like below

```    select ID, Max(A) from xyz
group by ID
having sum(case when c='I' then 1 else 0 end) <> sum(case when c='D' then 1 else 0 end)
```

17.00 - Scenario 2, Table Structure and Update Schedule, Query Workload, and Problem Statement This case study is a continuation of the scenario presented in Scenario 1. yet been sent to the Teradata Database is less than or equal to the total number of Set the number of cells above the average, but below the peak. Average and peak are functions of the configuration and the workload. running five FastLoad jobs and several BulkLoad jobs on a Teradata Database with eight

How about using `case`?

```select ID, Max(A)
from xyz
group by ID
having sum( case when c = 'I' then 1 else 0 end) <> sum(case when c = 'D' then 1 else 0 end)
```

Or:

```having sum(case when c = 'I' then 1
when c = 'D' then -1
else 0
end) <> 0
```

16.10 - Scenario 1, Current transactions are loaded into the table nightly using Teradata Parallel Transporter. Most transactions are The DBA then sets up tests for both scenarios. Teradata Database supports storage and manipulations that involve durations, spans of time defined by a beginning and ending bounds: By info-eng-team-td , 03 Oct 2013 | Tagged: scenario period data type period derived period v_database

This will find all `'I'` rows without matching `'D'` row:

```SELECT *
FROM mytab AS t1
WHERE DML_Operation = 'I'
AND NOT EXISTS
( SELECT *
FROM mytab AS t2
WHERE t2.id = t1.id
AND t2.b = t1.a
AND DML_Operation = 'D'
)
```

Teradata Interview Scenarios Part 1, Use this. But it will not give you R1 for all the rows. select m.CustNo,t.Rule, case when t.Amt is null then 0 else t.Amt end as Rule ,m.Date from� Bulls will argue that Teradata’s fundamental weakness is simply the temporary result of the firm’s transition from a perpetual software license and hardware business model to a recurring revenue,

▷ Top 89 Teradata Interview Questions & Answers [UPDATED 2020], This scenario describes a Job that creates a new Teradata database table, writes data into a delimited file, then loads the data from the file into this table, and� In a real-world scenario, you will have multiple databases in your SQL Schema. In order to perform any kind of operations on the database, you need to select the database first.   The SQL USE statement is used to select any …

Scenario on Teradata Joins, Transient journal maintains entries only for Delete command since Teradata Ideal scenario is when small table is redistributed to be joined with large table� Teradata is referred to as Relational database management system (RDBMS) that is used to drive the large Datawarehouse applications. Teradata was founded in the year 1979 and its headquarters is in San Diego, California. Teradata is capable of running the single and multi-nodes as well. The main concept behind Teradata is parallelism.

Scenario: Loading data into a Teradata database, This scenario will perform loads on the Primary Teradata system from the Oracle database using the steps and packages created in scenario 1. Once the data is� This scenario creates a simple three-dimensional array to represent aspects of a clothing vendor inventory. A table for Clothing has rows for different types of clothing. The inventory information for all the different styles, sizes, and colors of each clothing type is stored in a single field, the array type column for the row.