SQLite format 3@ tS  7kexiproject_minor_ver07kexiproject_major_ver1-kexidb_minor_ver2-kexidb_major_ver1 qX? gsinceSince gcarCar gownerOwner gidwId"  modelCar model idwID 5 b2 5 a1"  surnameSurname  nameName ageAge idwIDR     " > Verdana 12 50 0 1 0 0 true Name WordBreak|AlignBottom Line1 20 80 450 11 Plain 3 Horizontal TextLabel2 180 40 182 36 surname Verdana 12 50 0 1 0 0 true Surname WordBreak|AlignBottom obrazek2 380 10 90 70 AlignTop|AlignRight 3 age 20 150 148 21 age name 10 100 159 21 false name surname 170 100 200 21 false surname TextLabel1 TextLabel2 obrazek2 age name surname perty> 0 0 530 220 true form1 cars kexi/table NoFocus 203 238 185 TextLabel1 30 20 266 34 model Verdana 16 75 1 0 0 0 true Model TextLabel2 30 110 76 24 ID PushButton1 310 100 130 40 kaction:window_close Close Window PushButton2 < /property> 310 150 133 37 NoFocus kaction:data_save_row Save Changes TextLabel4 30 140 76 24 Model obrazek2 310 10 110 70 1 idEdit 110 110 120 20 id StrongFocus modelEdit 110 140 120 20 model kpushbutton.h klineedit.h TextLabel1 obrazek2 TextLabel2 idEdit PushButton1 TextLabel4 modelEdit PushButton2 558q QWidget formularz1 0 0 500 200 formularz1 persons kexi/table 255 220 168 TextLabel1 20 40 152 36 name QWidget report2 0 0 590 590 QWidget form1 Label1 10 20 566 134 ParentOrigin Trebuchet MS 48 75 1 1 0 0 Sales Report PicLabel1 420 170 1 1 PaletteBackground ParentOrigin 0 NoFrame image0 true SubReport1 20 170 330 290 789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f SubReport1 s'") query = table.query() cursor = connection.executeQuerySchema(query) if not cursor: raise("Query failed") sum = 0 max = 0 min = 1000 count = 0 # Walk through all items in the table. filename = os.path.expanduser("~")+os.sep+"SimpleReport54321.txt" f = codecs.open(filename, "wt", "utf-8") if not f: raise("Opening file failed") f.write("%s\t%s\t%s\n-------------------------\n" % (query.fieldlist().field(1).caption(), query.fieldlist().field(2).caption(), query.fieldlist().field(3).caption())) while cursor.moveNext(): count += 1 sum += cursor.value(1) if max < cursor.value(1): max = cursor.value(1) if min > cursor.value(1): min = cursor.value(1) f.write( "%s\t%s\t%s\n" % (cursor.value(1), cursor.value(2),cursor.value(3))) f.write( "\nAverage age:\t%.2f\n" % (sum / count) ) f.write( "Minimum age:\t%.2f\n" % min) f.write( "Maximum age:\t%.2f\n" % max) f.close() DD4chSELECT persons.name, persons.surname, persons.age, cars.model, ownership.since FROM persons, ownership, cars WHERE cars.id = ownership.car AND persons.id = ownership.ownersqlzue