Files

12 lines
6.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><sqlb_project><db path="C:/Code/Reco/data/reco.db" readonly="0" foreign_keys="1" case_sensitive_like="0" temp_store="0" wal_autocheckpoint="1000" synchronous="2"/><attached/><window><main_tabs open="query browser structure" current="1"/></window><tab_structure><column_width id="0" width="300"/><column_width id="1" width="0"/><column_width id="2" width="100"/><column_width id="3" width="7731"/><column_width id="4" width="0"/><expanded_item id="0" parent="1"/><expanded_item id="1" parent="1"/><expanded_item id="2" parent="1"/><expanded_item id="3" parent="1"/></tab_structure><tab_browse><table title="config" custom_title="0" dock_id="6" table="4,6:mainconfig"/><table title="sources" custom_title="0" dock_id="4" table="4,7:mainsources"/><table title="transactions" custom_title="0" dock_id="9" table="4,12:maintransactions"/><table title="deal_transactions" custom_title="0" dock_id="8" table="4,17:maindeal_transactions"/><table title="deals" custom_title="0" dock_id="7" table="4,5:maindeals"/><table title="deals" custom_title="0" dock_id="5" table="4,5:maindeals"/><table title="categories" custom_title="0" dock_id="1" table="4,10:maincategories"/><dock_state state="000000ff00000000fd00000001000000020000066500000440fc0100000001fc00000000000006650000014600fffffffa000000020100000007fb000000160064006f0063006b00420072006f00770073006500310100000000ffffffff0000012600fffffffb000000160064006f0063006b00420072006f00770073006500340100000000ffffffff0000011300fffffffb000000160064006f0063006b00420072006f00770073006500350100000000ffffffff0000014600fffffffb000000160064006f0063006b00420072006f00770073006500360100000000ffffffff0000011300fffffffb000000160064006f0063006b00420072006f00770073006500370100000000ffffffff0000014600fffffffb000000160064006f0063006b00420072006f00770073006500380100000000ffffffff0000014600fffffffb000000160064006f0063006b00420072006f00770073006500390100000000ffffffff0000014600ffffff000006650000000000000004000000040000000800000008fc00000000"/><default_encoding codec=""/><browse_table_settings><table schema="main" name="categories" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="32"/><column index="2" value="59"/><column index="3" value="300"/><column index="4" value="78"/><column index="5" value="143"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="config" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="38"/><column index="2" value="51"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="deal_transactions" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="68"/><column index="2" value="115"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="deals" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort><column index="13" mode="0"/></sort><column_widths><column index="1" value="32"/><column index="2" value="78"/><column index="3" value="62"/><column index="4" value="98"/><column index="5" value="92"/><column index="6" value="92"/><column index="7" value="85"/><column index="8" value="78"/><column index="9" value="71"/><column index="10" value="92"/><column index="11" value="267"/><column index="12" value="105"/><column index="13" value="71"/><column index="14" value="98"/><column index="15" value="92"/><column index="16" value="44"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="sources" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="32"/><column index="2" value="92"/><column index="3" value="93"/><column index="4" value="300"/><column index="5" value="236"/><column index="6" value="143"/><column index="7" value="98"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="transactions" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="43"/><column index="2" value="125"/><column index="3" value="81"/><column index="4" value="92"/><column index="5" value="125"/><column index="6" value="143"/><column index="7" value="280"/><column index="8" value="300"/><column index="9" value="300"/><column index="10" value="65"/><column index="11" value="71"/><column index="12" value="65"/><column index="13" value="78"/><column index="14" value="96"/><column index="15" value="141"/><column index="16" value="71"/><column index="17" value="92"/><column index="18" value="112"/><column index="19" value="105"/><column index="20" value="169"/><column index="21" value="92"/><column index="22" value="71"/><column index="23" value="98"/><column index="24" value="92"/><column index="25" value="44"/><column index="26" value="143"/><column index="27" value="143"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table></browse_table_settings></tab_browse><tab_sql><sql name="SQL 1*"> SELECT
COUNT(*) as total_count,
COALESCE(SUM(CASE WHEN d.direction = 'income' THEN d.amount ELSE 0 END), 0) as total_income,
COALESCE(SUM(CASE WHEN d.direction = 'expense' THEN ABS(d.amount) ELSE 0 END), 0) as total_expense,
COUNT(CASE WHEN d.reviewed = 0 AND ABS(d.amount) &gt;= 100 THEN 1 END) as pending_review,
COUNT(CASE WHEN d.reviewed = 1 THEN 1 END) as reviewed_count,
COALESCE(SUM(d.match_count), 0) as matched_count
FROM deals d
select * from deals</sql><current_tab id="0"/></tab_sql></sqlb_project>