AGILE

AGILE: Agile is iterative & incremental approach for planning and guiding project process where more focus is on functionality rather than comprehensive documentation.


PRINCIPLES:
  • Individuals and interactions over processes and tools.
  • Working software over comprehensive documentation.
  • Customer collaboration over contract negotiation.
  • Responding to change over following a plan.
TERMS  IN AGILE: 

1) User Story - Requirement

2) Epic - Collection of user stories/ Requirements

3) Product Backlog - SRS/BRD/ All requirements

4) Sprint - Time period for complete releasing the functionality

5) Sprint Planning Meeting - First meeting for considering the user stories for every sprint.

6) Sprint Backlog: Committed user stories

7) Scrum Meeting: Daily stand up calls for 15 minutes

8) Sprint retrospective meeting

9) Story point: Estimation of user story using Fibonacci series(11235...)
Eg: It can be 1 hr/ 1 day

10) Sprint Review: Review of functionality delivered

11) Burndown chart : To track progress

12) Burnup chart: To track release progress and to estimate when MVP (Minimum Viable product) can be provided 

13) Scrum Board

14) Ceremonies: Meetings
Eg: Sprint Planning Meeting/Scrum Meeting/Sprint retrospective meeting

-------------------------------------------------------------------------------------------------

Scrum is an agile development methodology/framework used in the development of Software based on an iterative and incremental processes. Scrum is adaptable, fast, flexible and effective agile framework that is designed to deliver value to the customer throughout the development of the project.

It assures that Agile principles are followed.



Extreme Programming (XP) is an agile software development framework that aims to produce higher quality software, and higher quality of life for the development. 




kanban board is an agile project management tool designed to help visualize work, limit work-in-progress, and maximize efficiency.

- Not much structured like Scrum
- Focus on Work In progress



------------------------------------------------------------------------------------------------------------------

SCRUM TEAM


The product owner represents the stakeholders of the project. The role is primarily responsible for setting the direction for product development or project progress.

The key responsibilities of a Product Owner include:
  • Scrum backlog management
  • Release management
  • Stakeholder management

The role of Scrum Master:

  • Facilitating the daily Scrum and Sprint initiatives.
  • Communicating between team members about evolving requirements and planning.
  • Coaching team members on delivering results.
  • Handling administrative tasks such as conducting meetings, facilitating collaboration, and eliminating hurdles affecting project progress.
  • Shielding team members from external interferences and distractions.
  DEVELOPMENT TEAM MEMBERS:
  •     Product designer
  •     Writer
  •     Programmer
  •     Tester
  •     UX specialist
      STAKE HOLDERS:
  •     The end user of the product
  •     Business executives
  •     Production support staff
  •     Investors
  •     External auditors
  •     Scrum team members from associated projects and teams

ADDITIONAL ROLES:
  • Technical and domain experts with the knowledge of technology as well as a wide variety of stakeholder requirements or expectations.
  • An independent testing and audit team may join the Scrum team members and work throughout the product development lifecycle.
  • An Integrator may be required among large teams that work on independent but closely coordinated subsystems for a project. The responsibility for the Integrator would include integration of the subsystems as well as testing that may be performed by external testing teams.
  • An Architect Owner may be required for architectural envisioning, planning and decision making.
-------------------------------------------------------------------------------------------------
VELOCITY & CAPACITY

Sprint Velocity: is the average completed (estimated) story points over the past three to five iterations.

Team Capacity: is a product of the total number of Scrum team members multiplied by the number of team productive days.

Eg: 
Sprint Velocity = 32 & 6 Team members working 8 hrs/day
FOCUS FACTOR: 32 /(6*8) = 0.67
Team effective capacity would be 0.67 * (6*8*10) = 321.6 hours
FOCUS FACTOR *(NO. OF RESOURCES*HOURS*DAYS)

-------------------------------------------------------------------------------------------------

DISADVANTAGES OF AGILE:

1) Poor resource planning
2) Limited documentation
3) Fragmented output
4) No finite end
5) Difficult measurement
-------------------------------------------------------------------------------------------------


RISK BASED TESTING: This testing is done in case there are chances of negative impact on production envt., which may happen due to,


1) Time constraint
2) Budget constraint
3) Resource constraint

To overcome this, approach which can be used is: Priotizing Technique, where important/critical features & TC's are prioritized and has to be made sure whether it is completed or not.

                    -------------------------------------------------------------------------------------------------

    REGRESSION SCOPE:

    It depends on,

   a) Project nature: Landing page/Professional page

   b) Project scope: 

     Small  (Manual)/ Medium(Manual+automation) / Large (Manual+automation)

   c) Stability of the project

   Then final approach can be decided as,

  1) Partial Regression

  2) Full Regression

                             -------------------------------------------------------------------------------------------------

PROJECT REPORTING:

AGILE:
1) Burndown Chart : User Stories(Target User Stories) Vs Time (Started Time to Target time)
2) Burnup chart: 
3) Sprint Report
4) Velocity Report: Committed Vs Completed
5) Cumulative flow diagram: No. of issues Vs Time
6) EPIC report
7) Epic burndown
8) Release burndown

DEVOPS:
9) Deployment frequency - DevOps

ISSUE ANALYSIS:
10) CREATED VS RESOLVED ISSUES
11) Resolution time report

FORECAST & MANAGEMENT:
11) Time tracking report
12) User Workload report

                                   -------------------------------------------------------------------------------------------------
READY & DONE:

READY:
1) User story is understood by the team
2) Story is written in simple format (As a User.....I want to.....So that...)
2) User story has clear business value 
3) User story is estimated
4) User story dependencies are identified
5) User stories are small
6) User story Acceptance criteria is defined

DONE:
1) Code is completed
2) Code is merged to main branch
3) Code review for code merge completed
4) Unit tests for story completed
5) User story is tested against the Acceptance Criteria
6) User story is demoed to the stake holders
7) Accepted by product owner
8) Documentation is updated

                                     -------------------------------------------------------------------------------------------------








Testing Basics

SOFTWARE TESTING:  It is a practice to execute the application in test with intent to find the defects before deploying the code to production.
-----------------------------------------------------------------------------------------------------------------------
PRINCIPLES OF TESTING:

1) Testing shows the presence of bugs: No application is error free
2) Pesticide Paradox : New test cases in Regression
3) Exhaustive testing is impossible: Not possible to test all possible combinations of data and scenarios
4) Early Testing
5) Defect clustering
6) Testing is context dependent: Different methodologies, techniques and types of testing is related to the type and nature of the application.
7) Absence of errors fallacy

-----------------------------------------------------------------------------------------------------------------------
TYPES OF TESTING :

1) FUNCTIONAL TESTING: Testing actual functionality developed by developer against the requirement specified by client.


2) NON-FUNCTIONAL TESTING: Testing to  check non functional aspects (Performance, usability, accessibility etc.)

Performance testing: Measuring response time.

Stress testing: Validates the system performance in the context of scarce resources, which involves running tests on low storage / memory configurations to identify bugs that may be undetectable in normal circumstances.

Load testing: Testing with huge no. of users.

Volume testing: Judges performance in the context of enormous amounts of data, involving an identification of where exactly the app fails, at what volume of data the system is unable to continue running. 

Usability testing: Basically to assess user-friendliness, GUI consistency, error reportage, and correct output in line with the business-specified requirements.

UI testing: Issues addressed here include layout, data movement from one page to another, and pop-ups for assistance if the system concludes that a user needs guidance.

Recovery testing: Validates if the app shuts down during failure without glitches and without affecting the system, and that the data is not lost. 

Compatibility testing: Checks overall compatibility with a range of operating systems, browsers, and devices, at varying strengths of configuration. 

Instability testing: Checks the smoothness of installs and uninstalls, and confirms that the app behavior remains steady if the disk space is limited. 

Documentation testing: Confirms the presence of guides, instructions, read-me, online assistance, release notes, etc. as part of the app package.

3) CHANGE RELATED TESTING :

  A) Confirmation/Retesting: Testing to confirm whether defects are fixed or not.

  B) Regression testing: Testing with intent to check whether application's old functionality is working fine after adding new functionality or after any modification in the code.

-----------------------------------------------------------------------------------------------------------------------
LEVELS OF TESTING:

A) Unit Testing: Smallest part of application called 'Units' are tested.

B) Integration Testing: Testing done with integrating different modules.

C) System Testing: End to end testing of application.

D) Acceptance Testing: Testing done by the client.

            i) Alpha Testing: Testing done by the client at Development side.

            ii) Beta Testing: Testing done by the client at Client side.
---------------------------------------------------------------------------------------------------------------------
 METHODS OF TESTING:

1) White Box Testing: Testing the code of application -- Done by Developer

2) Black Box Testing: Testing the functionality of application -- Done by Tester

3) Gray Box Testing: White Box Testing + Black Box Testing
-----------------------------------------------------------------------------------------------------------------------
DIFFERENCE BETWEEN SMOKE & SANITY:

Smoke: Testing with intent to check whether build/functionality/feature/ is testable or not.

Sanity: Testing with intent to check whether new functionality or bugs have been fixed.

-----------------------------------------------------------------------------------------------------------------------

DIFFERENCE BETWEEN ERROR, DEFECT, BUG & FAILURE:

1) A mistake in coding is called error.
2) Error found by tester is defect.
3) Defect accepted by developer is bug.
4) Build does not fulfils requirement then it is failure.
-----------------------------------------------------------------------------------------------------------------------

TYPES OF REVIEW:

1) Walkthrough: Not a formal process led by the authors/testers.

2) Technical review: Less formal review led by trained moderator.

3) Inspection: Most formal review led by trained moderator.

-----------------------------------------------------------------------------------------------------------------------
DIFFERENCE BETWEEN SEVERITY & PRIORITY:

Severity: Impact of defect on the functionality.

Priority: Priority suggests how fast defect can be fixed.
-----------------------------------------------------------------------------------------------------------------------
TESTING TECHNIQUES:

1) Equivalence partitioning: Selecting the values between the ranges.

Eg:    Requirement : Field should accept numeric values from 1 to 20

       TC_01:    To check if user is able to enter value from range 1 to 10 (Test data: 4)
                       
       TC_02:    To check if user is able to enter value from range 11 to 20 (Test data: 16)

2) Boundary value analysis: Testing the corner scenarios

Eg:     Requirement : Field should accept numeric values from 1 to 20

        TC_01:    To check if user is able to enter 0 in the field provided.(-ve testcase)
                       
      TC_02:    To check if user is able to enter 1 in the field provided.(+ve testcase)
    
      TC_03:    To check if user is able to enter 2 in the field provided.(+ve testcase)
                       
      TC_04:    To check if user is able to enter 19 in the field provided.(+ve testcase)

      TC_05:    To check if user is able to enter 20 in the field provided.(+ve testcase)

      TC_06:    To check if user is able to enter 21 in the field provided.(-ve testcase)

3) Decision table testing: Used to test system behavior for different input combinations.


4) State Transition: Here outputs are triggered by changes to the input conditions or changes to 'state' of the system.
 

-----------------------------------------------------------------------------------------------------------------------

Statement coverage / Path coverage / Branch-Decision coverage / Linear code sequence & Jump:

  • 100% LCSAJ coverage will imply 100% Branch/Decision coverage
  • 100% Path coverage will imply 100% Statement coverage
  • 100% Branch/Decision coverage will imply 100% Statement coverage
  • 100% Path coverage will imply 100% Branch/Decision coverage
  • Branch coverage and Decision coverage are same
-----------------------------------------------------------------------------------------------------------------------

SDLC (SOFTWARE DEVELOPMENT LIFE CYCLE)
-------------------------------------------------------------------------------------------------------------

STLC(SOFTWARE TESTING LIFE CYCLE)



------------------------------------------------------------------------------------------------------------
                                                                    SDLC MODELS

Waterfall: Once one phase is completed the only option is to move to next phase which turned into disadvantage and gave rise to other models.


              
 V-Model: Development and Testing is done parallelly. When developement team is busy in coding testing team starts doing review of documents and writing test cases.


Spiral: Once module is developed and tested, its given to client and post approval by client development of new module is started.

-------------------------------------------------------------------------------------------------------------


                                                         DEFECT LIFE CYCLE



-------------------------------------------------------------------------------------------------------------
  TEST MANAGER ACTIVITIES



---------------------------------------------------------------------
HOW REQUIREMENT ANALYSIS IS DONE:

1) User stories don't always include enough information for development decisions.
2) Involve stakeholders regularly.
3) Identify who are the end users & who are stakeholders
4) Prioritize requirements
5) Focus on executable requirements
6) Use INVEST principle: Independent, Negotiable, Valuable, Estimated, Small & Tested
                                                    ---------------------------------------------------------------------


SQL

What is SQL?


SQL stands for Structured Query Language
SQL lets you access and manipulate databases
SQL is an ANSI (American National Standards Institute) standard

Types of SQL Commands:


------------------------------------------------------------------------------------------------------------------------
Order of execution of query:

Each query begins with finding the data that we need in a database, and then filtering that data down into something that can be processed and understood as quickly as possible.

Example:

SELECT DISTINCT column, AGG_FUNC(column_or_expression),.... FROM blog1_table JOIN blog2_table ON blog1_table.column = blog2_table.column WHERE constraint_expression GROUP BY column HAVING constraint_expression ORDER BY column ASC/DESC LIMIT count OFFSET COUNT;

SEQUENCE:

1) The FROM clause, and subsequent JOINs are first executed to determine the total working set of data that is being queried.

2) Once we have the total working set of data, the first-pass WHERE constraints are applied to the individual rows, and rows that do not satisfy the constraint are discarded.

3) The remaining rows after the WHERE constraints are applied are then grouped based on common values in the column specified in the GROUP BY clause.

4) If the query has a GROUP BY clause, then the constraints in the HAVING clause are then applied to the grouped rows, discard the grouped rows that don't satisfy the constraint.

5) Any expressions in the SELECT part of the query are finally computed.

6) Of the remaining rows, rows with duplicate values in the column marked as DISTINCT will be discarded.

7) If an order is specified by the ORDER BY clause, the rows are then sorted by the specified data in either ascending or descending order.

8) Finally, the rows that fall outside the range specified by the LIMIT and OFFSET are discarded, leaving the final set of rows to be returned from the query.
------------------------------------------------------------------------------------------------------------------------

Constraints in SQL:
  • NOT NULL - Ensures that a column cannot have a NULL value
  • UNIQUE - Ensures that all values in a column are different
  • PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table
  • FOREIGN KEY - Prevents actions that would destroy links between tables
  • CHECK - Ensures that the values in a column satisfies a specific condition
  • DEFAULT - Sets a default value for a column if no value is specified
  • CREATE INDEX - Used to create and retrieve data from the database very quickly.

  • ---------------------------------------------------------------------------------------------------------------------
What Can SQL do?

SQL can execute queries against a database
SQL can retrieve data from a database
SQL can insert records in a database
SQL can update records in a database
SQL can delete records from a database
SQL can create new databases
SQL can create new tables in a database
SQL can create stored procedures in a database
SQL can create views in a database
SQL can set permissions on tables, procedures, and views
------------------------------------------------------------------------------------------------------------------------
RDBMS

RDBMS stands for Relational Database Management System.

RDBMS is the basis for SQL, and for all modern database systems such as MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.

The data in RDBMS is stored in database objects called tables.

A table is a collection of related data entries and it consists of columns and rows.

Some of The Most Important SQL Commands

SELECT - extracts data from a database
UPDATE - updates data in a database
DELETE - deletes data from a database
INSERT INTO - inserts new data into a database
CREATE DATABASE - creates a new database
ALTER DATABASE - modifies a database
CREATE TABLE - creates a new table
ALTER TABLE - modifies a table
DROP TABLE - deletes a table
CREATE INDEX - creates an index (search key)
DROP INDEX - deletes an index

SQL SELECT Statement

The SELECT statement is used to select data from a database.

The result is stored in a result table, called the result-set.

SQL SELECT Syntax

SELECT column_name,column_name
FROM table_name;
and

SELECT * FROM table_name;

Eg: SELECT EmployeeName,City FROM Employees;

Eg:SELECT * FROM Employees;


The SQL SELECT DISTINCT Statement


In a table, a column may contain many duplicate values; and sometimes you only want to list the different (distinct) values.

The DISTINCT keyword can be used to return only distinct (different) values.

SQL SELECT DISTINCT Syntax

SELECT DISTINCT column_name,column_name
FROM table_name;

Eg: SELECT DISTINCT City FROM Employees;

The SQL WHERE Clause

The WHERE clause is used to extract only those records that fulfill a specified criterion.

SQL WHERE Syntax

SELECT column_name,column_name
FROM table_name
WHERE column_name operator value;

Eg: SELECT * FROM Employees
WHERE EmployeeID=1508;

Operators in The WHERE Clause
The following operators can be used in the WHERE clause:

Operator    Description
=               Equal
<>             Not equal. Note: In some versions of SQL this operator may be written as !=
>               Greater than
<               Less than
>=             Greater than or equal
<=             Less than or equal
BETWEEN  Between an inclusive range
LIKE          Search for a pattern
IN             To specify multiple possible values for a column


The SQL AND & OR Operators


The AND operator displays a record if both the first condition AND the second condition are true.

The OR operator displays a record if either the first condition OR the second condition is true.

Eg: for AND operator
SELECT * FROM Employees
WHERE City='Nanded'
AND City='Thane';

Eg: for OR operator
SELECT * FROM Emplyees
WHERE City='Bhandup'
OR City='Dadar';

Eg: for both AND and OR
SELECT * FROM Employees
WHERE City='Mulund'
AND (City='CST' OR City='Badlapur');



The SQL ORDER BY Keyword


The ORDER BY keyword is used to sort the result-set by one or more columns.

The ORDER BY keyword sorts the records in ascending order by default.
To sort the records in a descending order, you can use the DESC keyword.

SQL ORDER BY Syntax

SELECT column_name,column_name
FROM table_name
ORDER BY column_name,column_name ASC|DESC;

Eg: SELECT * FROM Employees
ORDER BY City,EmployeeName;

The SQL INSERT INTO Statement

The INSERT INTO statement is used to insert new records in a table.


SQL INSERT INTO Syntax

It is possible to write the INSERT INTO statement in two forms.

The first form does not specify the column names where the data will be inserted, only their values:

INSERT INTO table_name
VALUES (value1,value2,value3,...);
The second form specifies both the column names and the values to be inserted:

INSERT INTO table_name (column1,column2,column3,...)
VALUES (value1,value2,value3,...);

Eg: INSERT INTO Employees
VALUES ('Cardinal','Tom B. Erichsen','Skagen 21','Stavanger','4006','Norway');
or this SQL statement (including column names):

Eg :INSERT INTO Employees (EmployeeName, ContactName, Address, City, PostalCode, Country)
VALUES ('Cardinal','Tom B. Erichsen','Skagen 21','Stavanger','4006','Norway');

Eg: INSERT INTO Employees (EmployeeName, City, Country)
VALUES ('Cardinal', 'Stavanger', 'Norway');

**The EmployeeID column is an AutoNumber field and is automatically updated with a unique number 
for each record in the table.

AutoNumber is a type of data used in Microsoft Access tables to generate an automatically incremented
numeric counter. The default AutoNumber type has a start value of 1 and an increment of1.

The SQL UPDATE Statement


The UPDATE statement is used to update existing records in a table.

SQL UPDATE Syntax

UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;

Eg: UPDATE Employees
SET ContactName='Alfred Schmidt', City='Hamburg'
WHERE EmployeerName='Alfreds Futterkiste';


The SQL DELETE Statement


The DELETE statement is used to delete rows in a table.

SQL DELETE Syntax

DELETE FROM table_name
WHERE some_column=some_value;

Eg: DELETE FROM Employees
WHERE EmployeeName='Alfreds Futterkiste' AND ContactName='Maria Anders';

Delete All Data
It is possible to delete all rows in a table without deleting the table. 
This means that the table structure, attributes, and indexes will be intact:

DELETE FROM table_name;

or

DELETE * FROM table_name;
------------------------------------------------------------------------------------------------------------------------

The SQL SELECT TOP Clause

The SELECT TOP clause is used to specify the number of records to return.

The SELECT TOP clause can be very useful on large tables with thousands of records. 
Returning a large number of records can impact on performance.

Note: Not all database systems support the SELECT TOP clause.

SQL Server / MS Access Syntax

SELECT TOP number|percent column_name(s)
FROM table_name;

SQL SELECT TOP Equivalent in MySQL and Oracle
MySQL Syntax

SELECT column_name(s)
FROM table_name
LIMIT number;
Example

SELECT *
FROM Persons
LIMIT 5;
Oracle Syntax

SELECT column_name(s)
FROM table_name
WHERE ROWNUM <= number;
Example

SELECT *
FROM Persons
WHERE ROWNUM <=5;

Eg: SELECT TOP 2 * FROM Employees;
Eg: SELECT TOP 50 PERCENT * FROM Employees;
------------------------------------------------------------------------------------------------------------------------
The SQL LIKE Operator

The LIKE operator is used to search for a specified pattern in a column.
 The "%" sign is used to define wildcards (missing letters) both before and after the pattern.

SQL LIKE Syntax

SELECT column_name(s)
FROM table_name
WHERE column_name LIKE pattern;

Eg: SELECT * FROM Employees
WHERE City LIKE 's%';--------selects all customers with a City starting with the letter "s"

Eg : SELECT * FROM Employees
WHERE City LIKE '%s';--------selects all customers with a City ending with the letter "s"

Eg: SELECT * FROM Employees
WHERE Country LIKE '%land%';-------selects all customers with a Country containing the pattern "land"

Eg: SELECT * FROM Employees
WHERE Country NOT LIKE '%land%';---selects all customers with a Country NOT containing the pattern "land"
------------------------------------------------------------------------------------------------------------------------

The IN Operator
The IN operator allows you to specify multiple values in a WHERE clause.

SQL IN Syntax

SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1,value2,...)

---------------------------------------------------------------------
Nth highest salary:

SELECT name, salary 
FROM Employee e1 
WHERE N-1 = (SELECT COUNT(DISTINCT salary) FROM Employee e2 WHERE e2.salary > e1.salary)
3rd highest means two salaries are higher than it, similarly Nth highest salary means N-1 salaries are higher than it.


4th highest salary:

SELECT  Max(Salary) 

FROM Employee LIMIT 3,1


---------------------------------------------------------------------

SELF JOIN:

Find customers from the same city?

SELECT A.CustomerName AS CustomerName1, B.CustomerName AS CustomerName2, A.City
FROM Customers A, Customers B
WHERE A.CustomerID <> B.CustomerID
AND A.City = B.City
ORDER BY A.City;

-----

In this example, the ManagerID column references the EmployeeID of the manager for each employee. Now, suppose you want to retrieve a list of employees along with their manager's name. You can use a self-join for this:


SELECT e.EmployeeID, e.FirstName, e.LastName, m.FirstName AS ManagerFirstName, m.LastName AS ManagerLastName FROM employees e LEFT JOIN employees m ON e.ManagerID = m.EmployeeID;

---------------------------------------------------------------------

Delete Duplicate Records:

WITH CTE AS (
    SELECT
        EmployeeID,
        ROW_NUMBER() OVER (PARTITION BY DepartmentID ORDER BY EmployeeID) AS RowNum
    FROM
        employee
)
DELETE FROM employee
WHERE EmployeeID IN (SELECT EmployeeID FROM CTE WHERE RowNum > 1);

-----------------------------------------------------------------------

Validate schema of the table:

SELECT column_name, data_type, is_nullable
FROM information_schema.columns
WHERE table_name = 'Employee'

-----------------------------------------------------------------------

Copy data from one table to another

INSERT INTO my_schema.department_backup
SELECT * FROM my_schema.department
-----------------------------------------------------------------------

Comparison using tables in another database

select mediavehicleprintinterestsourcesystemuniquekey, mediavehicleprintinterestname
FROM OPENROWSET(
        BULK 'https://neustacv2mdsdev01.dfs.core.windows.net/datalake/uk_matrix_datamart/media_vehicle_print_interest/**',
FORMAT='PARQUET'
    ) d  

except
select mediavehicleprintinterestsourcesystemuniquekey, mediavehicleprintinterestname
FROM  uk_matrix_datamart.media_vehicle_print_interest

-----------------------------------------------------------------------------------------------------------

Adding million records in the table

DECLARE @Counter INT = 64011 + 1;
DECLARE @EndCounter INT = @Counter + 1524; -- Add 1 million records

WHILE @Counter <= @EndCounter
BEGIN
    INSERT INTO dbo.AK_View2_Media_Agency (MEDIA_AGENCY_ID, EnglishEntityName)
    VALUES (@Counter, 'NewMedia');  -- Adjust 'YourDataHere' with the actual data

    SET @Counter = @Counter + 1;
END;
-----------------------------------------------------------------------------------------------------------