-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from pinknetworkx/develop
Develop
- Loading branch information
Showing
15 changed files
with
466 additions
and
128 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UPDATE dbinfo SET "value" = '1.3.13' WHERE name = 'version'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,15 @@ | ||
CREATE OR REPLACE VIEW atomicmarket_stats_prices_master AS | ||
SELECT * | ||
FROM ( | ||
( | ||
SELECT | ||
sale.market_contract, 'sale' listing_type, sale.sale_id listing_id, | ||
sale.assets_contract, sale.collection_name, | ||
MIN(asset.schema_name) schema_name, MIN(asset.template_id) template_id, MIN(asset.asset_id) asset_id, | ||
sale.settlement_symbol symbol, sale.final_price price, sale.updated_at_time "time" | ||
FROM | ||
atomicassets_assets asset, atomicassets_offers_assets offer_asset, atomicmarket_sales sale | ||
WHERE | ||
sale.assets_contract = offer_asset.contract AND sale.offer_id = offer_asset.offer_id AND | ||
offer_asset.contract = asset.contract AND offer_asset.asset_id = asset.asset_id AND | ||
sale.final_price IS NOT NULL AND sale.state = 3 | ||
GROUP BY sale.market_contract, sale.sale_id | ||
HAVING COUNT(*) = 1 | ||
) UNION ALL ( | ||
SELECT | ||
auction.market_contract, 'auction' listing_type, auction.auction_id listing_id, | ||
auction.assets_contract, auction.collection_name, | ||
MIN(asset.schema_name) schema_name, MIN(asset.template_id) template_id, MIN(asset.asset_id) asset_id, | ||
auction.token_symbol symbol, auction.price, (auction.end_time * 1000) "time" | ||
FROM | ||
atomicassets_assets asset, atomicmarket_auctions_assets auction_asset, atomicmarket_auctions auction | ||
WHERE | ||
auction.assets_contract = auction_asset.assets_contract AND auction.auction_id = auction_asset.auction_id AND | ||
auction_asset.assets_contract = asset.contract AND auction_asset.asset_id = asset.asset_id AND | ||
auction.buyer IS NOT NULL AND auction.state = 1 AND auction.end_time < extract(epoch from now()) | ||
GROUP BY auction.market_contract, auction.auction_id | ||
HAVING COUNT(*) = 1 | ||
) UNION ALL ( | ||
SELECT | ||
buyoffer.market_contract, 'buyoffer' listing_type, buyoffer.buyoffer_id listing_id, | ||
buyoffer.assets_contract, buyoffer.collection_name, | ||
MIN(asset.schema_name) schema_name, MIN(asset.template_id) template_id, MIN(asset.asset_id) asset_id, | ||
buyoffer.token_symbol symbol, buyoffer.price, buyoffer.updated_at_time "time" | ||
FROM | ||
atomicassets_assets asset, atomicmarket_buyoffers_assets buyoffer_asset, atomicmarket_buyoffers buyoffer | ||
WHERE | ||
buyoffer.assets_contract = buyoffer_asset.assets_contract AND buyoffer.buyoffer_id = buyoffer_asset.buyoffer_id AND | ||
buyoffer_asset.assets_contract = asset.contract AND buyoffer_asset.asset_id = asset.asset_id AND | ||
buyoffer.state = 3 | ||
GROUP BY buyoffer.market_contract, buyoffer.buyoffer_id | ||
HAVING COUNT(*) = 1 | ||
) | ||
) t1 | ||
SELECT | ||
market_contract, | ||
listing_type, | ||
listing_id, | ||
assets_contract, | ||
collection_name, | ||
schema_name, | ||
template_id, | ||
asset_id, | ||
symbol, | ||
price, | ||
"time" | ||
FROM atomicmarket_stats_markets | ||
WHERE asset_id IS NOT NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.