rom_analyse.sql 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. -- Global
  2. select count(*) from roms;
  3. select distinct rom_name from roms;
  4. select count(*) from roms where rom_sram = 0;
  5. -- Hirom x Sram
  6. select count(*) from roms where rom_hirom= 1;
  7. select count(*),rom_internalsize from roms where rom_hirom= 1 group by rom_internalsize;
  8. select count(*) as count ,rom_internalsize,rom_sram from roms where rom_hirom= 1 group by rom_internalsize,rom_sram having rom_sram > 0;
  9. -- Lorom x Sram
  10. select count(*) from roms where rom_hirom= 0;
  11. select count(*),rom_internalsize from roms where rom_hirom= 0 group by rom_internalsize;
  12. select count(*) as count ,rom_internalsize,rom_sram from roms where rom_hirom= 0 group by rom_internalsize,rom_sram having rom_sram > 0;
  13. -- Sram
  14. select count(*) as count ,rom_sram from roms group by rom_sram having count > 1;
  15. -- Rom
  16. select count(*) as count ,rom_size from roms group by rom_size having count > 1;
  17. select count(*) as count ,rom_size from roms group by rom_size having count > 10;
  18. select count(*) as count ,rom_internalsize from roms group by rom_internalsize having count > 1;
  19. select count(distinct rom_name) as count ,rom_internalsize from roms group by rom_internalsize having count > 1;
  20. select count(*) as count ,rom_size,rom_internalsize from roms group by rom_size having count > 10;
  21. -- Type
  22. -- 00 ROM
  23. -- 01 ROM/RAM
  24. -- 02 ROM/SRAM
  25. -- 03 ROM/DSP1
  26. -- 04 ROM/DSP1/RAM
  27. -- 05 ROM/DSP1/SRAM
  28. -- 06 FX
  29. select count(*) as count ,rom_type from roms group by rom_type having count > 1;
  30. select count(*) as count ,rom_type from roms group by rom_type having count > 5;
  31. select count(*) as count from roms where rom_type > 2;
  32. select count(*) as count from roms where rom_type <= 2;
  33. --
  34. -- cleanup
  35. --
  36. --delete from roms where rom_vendor = 'Demo or Beta ROM?';
  37. --delete from roms where rom_internalsize > 128;
  38. --delete from roms where rom_name like "%.....%";
  39. --delete from roms where rom_name like "%\%";
  40. --delete from roms where rom_vendor = 'Unknown';