473,463 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reporting Suspicious Financial Transactions

Sam
I want to monitor any suspicious financial transaction which take
place in a bank through electronic transfer.

There are three tables Customers, Account and transaction_type.

How can I write a SQl to report the following:

Detect an outbound Electronic transfer that is unusually high,
compared to a set threshold.
For each customer, generate alerts if any outbound Electronic Transfer
exceeds threshold.

Detect Electronic Transfer that are high, compared to a set threshold.

For each customer, generate alerts if any set of last 5 outbound
Electronic Transfers exceeds the set threshold.

Detect Electronic Transfer that are high, compared to historical
behavior of the customer.

For each customer, generate alerts if any set of last 5 Electronic
Transfer (the average of all sets of 5 outbound Electronic Transfer +2
standard deviation points)
Jul 20 '05 #1
6 1645
[posted and mailed]

Sam (ma******@europe.com) writes:
I want to monitor any suspicious financial transaction which take
place in a bank through electronic transfer.

There are three tables Customers, Account and transaction_type.

How can I write a SQl to report the following:

Detect an outbound Electronic transfer that is unusually high,
compared to a set threshold.
For each customer, generate alerts if any outbound Electronic Transfer
exceeds threshold.

Detect Electronic Transfer that are high, compared to a set threshold.

For each customer, generate alerts if any set of last 5 outbound
Electronic Transfers exceeds the set threshold.

Detect Electronic Transfer that are high, compared to historical
behavior of the customer.

For each customer, generate alerts if any set of last 5 Electronic
Transfer (the average of all sets of 5 outbound Electronic Transfer +2
standard deviation points)


First: decide which engine you want this implemented on. You have
cross-posted this to three newsgroups for three different products,
and the solution is not likely to be the same for all three. Unless,
portability is a requirement, but then you need to specify this.

Second, do you really expect anyone to write a query for you, without
the tables at hand. There is a standard recommendation for these kind
of questions, and that is to include:

o CREATE TABLE statements for your table(s).
o INSERT statements with sample data.
o The desired output from that sample data.

That makes it possible for anyone to post a tested solution.

Unless... this is really a school assignment, in which case you should
solve the problem yourself and not ask someone else to do it.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
G'Day Sam,

Without you posting the schedma for the data how can
you expect the SQL to be applicable to your data?

Below are some guesses ...
"Sam" <ma******@europe.com> wrote in message
news:51**************************@posting.google.c om...
I want to monitor any suspicious financial transaction which take
place in a bank through electronic transfer.

There are three tables Customers, Account and transaction_type.

How can I write a SQl to report the following:

Detect an outbound Electronic transfer that is unusually high,
compared to a set threshold.
For each customer, generate alerts if any outbound Electronic Transfer
exceeds threshold.

Select 'EFT Alert for ' + Customers.customer_name +
' -- Date: ' + cast(account.transaction_date as varchar) +
' $Amt: ' + account.transaction_amount

from account
join customers in some manner

where transaction_amount > XXX ---- insert threashold here
Detect Electronic Transfer that are high, compared to a set threshold.

For each customer, generate alerts if any set of last 5 outbound
Electronic Transfers exceeds the set threshold.

Use the TOP 5 .
You will have to sum and then compare.

Detect Electronic Transfer that are high, compared to historical
behavior of the customer.
For each customer, generate alerts if any set of last 5 Electronic
Transfer (the average of all sets of 5 outbound Electronic Transfer +2
standard deviation points)

Beware of spamming the client.


Jul 20 '05 #3
"mountain man" <hobbit@southern_seaweed.com.op> wrote in message news:<yS******************@news-server.bigpond.net.au>...

Beware of spamming the client.


Not much chance of you going into too much trouble doing that..

Hahahahahahahahaha
Jul 20 '05 #4
Sam
please see below the data and the Schema DDL:

Accounts Table

Trans_Id Cust_ID(FK) Acct_No Trans_type (FK) Trans_Amount Trans Limit Trans_date
10081 001 12345 100 208212 206212 2002-02-03
10082 001 12345 100 1755 206212 2002-02-03
10083 001 12345 100 30712 206212 2002-02-03
10084 001 12345 100 106212 206212 2002-02-03
10085 001 12345 100 100212 206212 2002-02-03
10096 001 12345 100 116000 206212 2002-01-03
10097 001 12345 100 110970 206212 2002-01-03
10098 002 10345 100 116975 10050 2002-01-03
10099 001 12345 100 28441 206212 2002-01-03
10000 001 12345 100 28391 206212 2002-01-03
|10001 003 12346 100 1537 206212 2001-12-03
10002 003 12346 100 1376 206212 2001-12-03
10003 002 10345 100 16234 10050 2001-12-03
10104 001 12345 100 16374 206212 2001-12-03
10105 001 12345 100 52875 206212 2001-12-03
10106 001 12345 100 450 206212 2001-12-03
10107 001 12345 100 7875 206212 2001-12-03
10108 002 10345 100 16374 10050 2001-12-03

Transaction Type Table
TransType_ID (PK) T_Type
100 Electronic Transaction
102 DD

Customers

Customer_ID(PK) Account_No Cust_Name
01 12345 A. Jones
02 10345 K. Mark
03 12346 E. Gander

Create table Accounts ( Trans_Id Number Primary Key
Trans_Amount Number,
Trans_Date Date,
Trans_limit Number,
Acct_No Number,
Trans_type References Transaction_Type,
Cust_Id References Customers);

Create table Customers (Cust_Id Number Primary Key
Acct_No Number,
Cust_Name Varchar 2);
Create table Transaction_Type (TransType_Id Number Primary Key
T_Type Varchar 2);
Thanks,

Sam.

Erland Sommarskog <so****@algonet.se> wrote in message news:<Xn*********************@127.0.0.1>...
[posted and mailed]

Sam (ma******@europe.com) writes:
I want to monitor any suspicious financial transaction which take
place in a bank through electronic transfer.

There are three tables Customers, Account and transaction_type.

How can I write a SQl to report the following:

Detect an outbound Electronic transfer that is unusually high,
compared to a set threshold.
For each customer, generate alerts if any outbound Electronic Transfer
exceeds threshold.

Detect Electronic Transfer that are high, compared to a set threshold.

For each customer, generate alerts if any set of last 5 outbound
Electronic Transfers exceeds the set threshold.

Detect Electronic Transfer that are high, compared to historical
behavior of the customer.

For each customer, generate alerts if any set of last 5 Electronic
Transfer (the average of all sets of 5 outbound Electronic Transfer +2
standard deviation points)


First: decide which engine you want this implemented on. You have
cross-posted this to three newsgroups for three different products,
and the solution is not likely to be the same for all three. Unless,
portability is a requirement, but then you need to specify this.

Second, do you really expect anyone to write a query for you, without
the tables at hand. There is a standard recommendation for these kind
of questions, and that is to include:

o CREATE TABLE statements for your table(s).
o INSERT statements with sample data.
o The desired output from that sample data.

That makes it possible for anyone to post a tested solution.

Unless... this is really a school assignment, in which case you should
solve the problem yourself and not ask someone else to do it.

Jul 20 '05 #5
Sam (ma******@europe.com) writes:
please see below the data and the Schema DDL:
You did not answer which DB enging you are using. It does not seem
to be SQL Server:

Create table Accounts ( Trans_Id Number Primary Key
Trans_Amount Number,
Trans_Date Date,
Trans_limit Number,
Acct_No Number,
Trans_type References Transaction_Type,
Cust_Id References Customers);


There are no pre-defined data types Date or Number in SQL Server.
And I don't think you can skip the data type altogether just because
you have a REFERENCES constraint.

Furthermore, the sample data was not in form of INSERT statements.

Yes, getting correct scripts means that you will have to do some work,
but since you are the one who is in need of a solution, that seems to
me like a fair deal.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #6
I think your previous message hit the nail on the head, this is a
homework assignment. Anybody in a position to do this is real life
would know how.

On Sun, 28 Dec 2003 23:40:24 +0000 (UTC), Erland Sommarskog
<so****@algonet.se> wrote:
Sam (ma******@europe.com) writes:
please see below the data and the Schema DDL:


You did not answer which DB enging you are using. It does not seem
to be SQL Server:

Create table Accounts ( Trans_Id Number Primary Key
Trans_Amount Number,
Trans_Date Date,
Trans_limit Number,
Acct_No Number,
Trans_type References Transaction_Type,
Cust_Id References Customers);


There are no pre-defined data types Date or Number in SQL Server.
And I don't think you can skip the data type altogether just because
you have a REFERENCES constraint.

Furthermore, the sample data was not in form of INSERT statements.

Yes, getting correct scripts means that you will have to do some work,
but since you are the one who is in need of a solution, that seems to
me like a fair deal.


Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: John Bentley | last post by:
John Bentley writes at this level: If we think about our savings accounts then division never comes in (as far as I can see). We deposit and withdraw exact amounts most of the time. Occasionaly...
4
by: Jack | last post by:
Hi, I am building a ASP financial reporting application. Here the user inputs quarterly financial information. The data obtained is being used for uploading a separate in-house application. The...
3
by: yashgt | last post by:
Hi, We will be developing a management reporting software for a bank. The user will see reports that get updated in near real time( e.g. every 5 min), with data regarding transaction amounts,...
8
by: Brendan Reynolds | last post by:
I'm trying to integrate SQL Server Reporting Services reports into an ASP.NET app (SRS 2000, ASP.NET 1.1). I know how to do this using direct URL addressing, but this exposes in the query string...
6
by: Mitchell Vincent | last post by:
I run a small development shop that develops some financial software and other utilities and I'm looking for a reporting solution. Crystal Reports looks excellent but is way too expensive. I'd like...
0
by: =?Utf-8?B?amRzdGVudG8=?= | last post by:
(I apologize if this is a repeat. I was told to post under the managed news group. I'm a little confused, but...) I'm running SRS 2000 with SP2 and I'm using IE 6.0 with SP2 (and IE 7.0) to...
0
by: JTP PR | last post by:
Business Intelligence software company, Yellowfin today announced its successful foray into the Asia Pacific telecommunications sector through its expanding partner network. Two organisations,...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.