Giter Site home page Giter Site logo

traksb / userfrauddetectionsql Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 9 KB

SQL-based solution for detecting potential fraud in user activities by cross-referencing location, IP, and carrier data. Assists in identifying discrepancies in user-provided and system-captured info, enhancing platform security and reducing fraudulent transactions.

License: MIT License

userfrauddetectionsql's Introduction

Fraud Detection System

Overview

This repository contains SQL logic designed to detect potentially fraudulent user activities based on discrepancies between user location, IP address, and mobile carrier information. If the information such as location_name, sub_ip, user_ip_country, sub_carrier_country, user_carrier_country, and prefix are not matching, users might be flagged as suspicious.

Structure

The core logic is divided into two main parts:

  1. user_submission_data: A Common Table Expression (CTE) that collates data on user submissions including IP addresses, mobile carriers, and determined actions based on discrepancies.
  2. carrier_check_data: A CTE that verifies the mobile carrier data against the location data.

The final query joins these two CTEs to extract the necessary fields for the detection of potential fraud.

Usage

  1. Update the date placeholders {{ date.start }} and {{ date.end }} in the SQL script with the desired date range.
  2. Ensure you have a connection to the relevant database.
  3. Execute the SQL script to obtain the results which will list potentially fraudulent users based on the mentioned criteria.

Dependencies

Ensure your database contains the following tables with respective fields:

  • submissions: Stores data about user submissions.
  • users: Information about users including their IP and mobile carrier.
  • locations: Provides details about locations associated with submissions.
  • projects: Project-related data.

Contribution

Feel free to raise issues or PRs if you think some part of the logic can be improved or if there are any discrepancies in the results.

userfrauddetectionsql's People

Contributors

traksb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.