Giter Site home page Giter Site logo

commerce-example-sql's Issues

10/18일자 - 정한수

1

datetime = 8bytes의 문자열
timestamp = 4bytes의 숫자형 (+3 bytes의 초단위)
timestamp는 시스템의 표준시간대를 토대로 utc로 변환하여 저장한다.

1-1

createdAt : 언제 해당 레코드가 생성되었는지를 의미한다.
updatedAt : 해당 레코드가 최근에 언제 수정되었는지를 의미한다.
deletedAt : 해당 레코드가 논리 삭제를 당한 일자를 의미한다. 물리적으로 삭제하기에는 사용자가 실수로 해당 데이터를 지우거나 하는 등의 이유로 복구를 요청하는 등의 위험성이 있기 때문.

2번은 써놓은 대로

3-c

select avg(c.count) from (select count(*) as count from guest as g group
by g.user_id) as c;

3-d

select avg(c.count) from (select count(*) as count from guest as g group
by g.user_id having count(*) != 1) as c;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.