3 Suggested additional solution using APPLY
source | link

Unless I completely destroy the question in my head this is what you meant by two rows out of each one:

create table #TableOne (
    TxnId int, 
    FromUserId int, 
    ToUserId int, 
    Price decimal(5,2)) ;

insert into #TableOne values 
    (1, 1, 2, 100.01),
    (2, 1, 2, 100.01),
    (3, 2, 1, 100.01),
    (4, 2, 1, 100.01),
    (5, 3, 4, 100.01),
    (6, 4, 3, 100.01),
    (7, 4, 3, 100.01) ;

select 
    FromUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne 
union all 
select 
    ToUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne ;

Alternatively, using APPLY (lateral join):

SELECT
    CA.FocalUserId,
    TON.TxnId,
    TON.FromUserId,
    TON.ToUserId,
    TON.Price 
FROM #TableOne AS TON
CROSS APPLY 
(
    VALUES 
        (TON.FromUserId), 
        (TON.ToUserId)
) AS CA (FocalUserId);

Unless I completely destroy the question in my head this is what you meant by two rows out of each one:

create table #TableOne (
    TxnId int, 
    FromUserId int, 
    ToUserId int, 
    Price decimal(5,2)) ;

insert into #TableOne values 
    (1, 1, 2, 100.01),
    (2, 1, 2, 100.01),
    (3, 2, 1, 100.01),
    (4, 2, 1, 100.01),
    (5, 3, 4, 100.01),
    (6, 4, 3, 100.01),
    (7, 4, 3, 100.01) ;

select 
    FromUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne 
union all 
select 
    ToUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne ;

Unless I completely destroy the question in my head this is what you meant by two rows out of each one:

create table #TableOne (
    TxnId int, 
    FromUserId int, 
    ToUserId int, 
    Price decimal(5,2)) ;

insert into #TableOne values 
    (1, 1, 2, 100.01),
    (2, 1, 2, 100.01),
    (3, 2, 1, 100.01),
    (4, 2, 1, 100.01),
    (5, 3, 4, 100.01),
    (6, 4, 3, 100.01),
    (7, 4, 3, 100.01) ;

select 
    FromUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne 
union all 
select 
    ToUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne ;

Alternatively, using APPLY (lateral join):

SELECT
    CA.FocalUserId,
    TON.TxnId,
    TON.FromUserId,
    TON.ToUserId,
    TON.Price 
FROM #TableOne AS TON
CROSS APPLY 
(
    VALUES 
        (TON.FromUserId), 
        (TON.ToUserId)
) AS CA (FocalUserId);
2 add terminators
source | link

Unless I completely destroy the question in my head this is what you meant by two rows out of each one:

create table #TableOne (
    TxnId int, 
    FromUserId int, 
    ToUserId int, 
    Price decimal(5,2)) ;

insert into #TableOne values 
    (1, 1, 2, 100.01),
    (2, 1, 2, 100.01),
    (3, 2, 1, 100.01),
    (4, 2, 1, 100.01),
    (5, 3, 4, 100.01),
    (6, 4, 3, 100.01),
    (7, 4, 3, 100.01) ;

select 
    FromUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne 
union all 
select 
    ToUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne ;

Unless I completely destroy the question in my head this is what you meant by two rows out of each one:

create table #TableOne (
    TxnId int, 
    FromUserId int, 
    ToUserId int, 
    Price decimal(5,2))

insert into #TableOne values 
    (1, 1, 2, 100.01),
    (2, 1, 2, 100.01),
    (3, 2, 1, 100.01),
    (4, 2, 1, 100.01),
    (5, 3, 4, 100.01),
    (6, 4, 3, 100.01),
    (7, 4, 3, 100.01)

select 
    FromUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne 
union all 
select 
    ToUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne

Unless I completely destroy the question in my head this is what you meant by two rows out of each one:

create table #TableOne (
    TxnId int, 
    FromUserId int, 
    ToUserId int, 
    Price decimal(5,2)) ;

insert into #TableOne values 
    (1, 1, 2, 100.01),
    (2, 1, 2, 100.01),
    (3, 2, 1, 100.01),
    (4, 2, 1, 100.01),
    (5, 3, 4, 100.01),
    (6, 4, 3, 100.01),
    (7, 4, 3, 100.01) ;

select 
    FromUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne 
union all 
select 
    ToUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne ;
1
source | link

Unless I completely destroy the question in my head this is what you meant by two rows out of each one:

create table #TableOne (
    TxnId int, 
    FromUserId int, 
    ToUserId int, 
    Price decimal(5,2))

insert into #TableOne values 
    (1, 1, 2, 100.01),
    (2, 1, 2, 100.01),
    (3, 2, 1, 100.01),
    (4, 2, 1, 100.01),
    (5, 3, 4, 100.01),
    (6, 4, 3, 100.01),
    (7, 4, 3, 100.01)

select 
    FromUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne 
union all 
select 
    ToUserId AS FocalUserId,
    TxnId,
    FromUserId,
    ToUserId,
    Price
from #TableOne