blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
2ab838cf5df8c4cde38eb1479e74d7cabe84863c | SQL | cin-lawrence/sqlcookbook | /commander/commands/chapter12/06.sql | UTF-8 | 479 | 3.59375 | 4 | [] | no_license | -- 12.6 Pivoting a Result Set to Facilitate Inter-Row Calculations --
select d20_sal - d10_sal as d20_10_diff, d20_sal - d30_sal as d20_30_diff
from (
select
sum(
case
when deptno = 10 then sal
end
) as d10_sal,
sum(
case
when deptno = 20 then sal
... | true |
6af214797727b6b8892d5640a34281c982b87464 | SQL | jgarzonext/packages | /paquete body/PAC_IAX_AGE_DATOS.sql | ISO-8859-2 | 25,678 | 2.859375 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Package Body PAC_IAX_AGE_DATOS
--------------------------------------------------------
CREATE OR REPLACE EDITIONABLE PACKAGE BODY "AXIS"."PAC_IAX_AGE_DATOS" AS
/******************************************************************************
NOMB... | true |
d2d3a92907a18153f2f07c479309843f79e70b94 | SQL | danielwcosta/Projeto-Cursos | /data-base/aula3.sql | UTF-8 | 2,067 | 4.03125 | 4 | [] | no_license | SELECT * FROM projeto_cursos.usuarios;
SELECT COUNT(*) FROM usuarios; /* 13 USUARIOS*/
SELECT COUNT(*) FROM usuarios
WHERE tipo_usuario_fk = 3; /* 9 alunos */
SELECT * FROM cursos;
SELECT AVG(preco)
FROM cursos; /* média de preço: 267.5*/
SELECT MIN(preco)
FROM cursos; /* valor minimo 50*/
SELECT MAX(preco)
FROM ... | true |
29e1f38a8370e4a3805d1d7e91a7dd09cee81ac9 | SQL | Hobbi5g/4win | /siteditor/query/editgame2.sql | UTF-8 | 416 | 3.40625 | 3 | [] | no_license | rates.`netmode4`,
longreports.gameid,
longreports.report,
longreports.checked,
members.author,
members.userid,
members.login
FROM games
INNER JOIN members ON (members.userid = $gameid)
INNER JOIN longreports ON (longreports.gameid = $gameid)
INNER JOIN rates ON ... | true |
222317f0d2d5ff7640e3753651777dbb12b079de | SQL | aiminho/spring-boot-oauth2 | /document/db/initDB.sql | UTF-8 | 3,550 | 3.25 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50719
Source Host : localhost:3306
Source Database : oauth2_test
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2017-11-16 15:41:56
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
b19d0f9d47a347ce30e13076da298adb7ca88ee6 | SQL | PetePhx/relational-databases | /exercises/DML_DDL_DCL/03.sql | UTF-8 | 342 | 2.9375 | 3 | [] | no_license | -- DML/DDL/DCL Part 3
--
-- Does the following statement use the DDL or DML component of SQL?
CREATE TABLE things (
id serial PRIMARY KEY,
item text NOT NULL UNIQUE,
material text NOT NULL
);
Answer:
Creating a table and the associated schema responsible for defining the data
structure is part of the Data ... | true |
b6fc142f8fa0f36cc347f0d2a881d96ce963ce30 | SQL | requiem958/JO | /req.sql | UTF-8 | 1,105 | 3.046875 | 3 | [] | no_license | <<<<<<< HEAD
INSERT INTO LesSportifs values (:num,:nom,:prenom,:pays,:cat,:date);
INSERT INTO LesEquipes values (:numS,:numE);
INSERT INTO LesLocataires values (:numS,:nLog,nBat);
-- Affichage des logements disponibles
with X as (
select NomBat, nlogement, count( nSportif) as occupe,capacite from lesLogements n... | true |
327eb3228ed38fc0caa24e06fd8e6f882a45dcc1 | SQL | felipemm/site-seed-template | /docs/generate calendar table mysql.sql | UTF-8 | 2,964 | 4.28125 | 4 | [] | no_license | -- create staging table to generate dummy rows
create table ints(i tinyint);
insert into ints values(0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-- create staging table
create table dates (
dia date primary key
);
-- put initial date value
insert into dates values ('1986-01-01');
-- create view to generate subsequent d... | true |
943792ed69091745b39e68ebf9f9771065792505 | SQL | GustavoCostella/bd1 | /equipes.sql | UTF-8 | 2,939 | 3.984375 | 4 | [] | no_license | /*Comandos em psql
psql -U postgres -h localhost -d postgres
\c nome_banco conecta no banco
\d mostra as tabels do nome_banco
\d nome_tabela mostra a tabela especifica
insert into nome_tabela (lista de colunas separadas por virgula) value (valores)
select * from nome_tabela mostra os valores da tabela
id serial constra... | true |
e0e584f7bc1a64371d88f48b767c8cffca719892 | SQL | jeffmcbride/TestDomePracticeProblems | /SQL/Enrollment.sql | UTF-8 | 384 | 3.078125 | 3 | [] | no_license | /*A table containing the students enrolled in a yearly course has incorrect data in records with ids between 20 and 100 (inclusive).
TABLE enrollments
id INTEGER NOT NULL PRIMARY KEY
year INTEGER NOT NULL
studentId INTEGER NOT NULL
-- Write only the SQL statement that solves the problem and nothing else.
*/
UPD... | true |
f127297bf2a7e201f5598be73f2cc473d87b79db | SQL | dael-victoria-reyes/data-act-broker-backend | /dataactvalidator/config/sqlrules/b7_object_class_program_activity_1.sql | UTF-8 | 376 | 3.34375 | 3 | [
"CC0-1.0"
] | permissive | -- GrossOutlaysDeliveredOrdersPaidTotal (FYB) = USSGL 4908. This applies to the program activity and object class level.
SELECT
row_number,
gross_outlays_delivered_or_fyb,
ussgl490800_authority_outl_fyb
FROM object_class_program_activity
WHERE submission_id = {0}
AND COALESCE(gross_outlays_delivered_or_... | true |
d515bf5da40fcc1208508e3122a73f0c61f9d7c8 | SQL | ashishbijlani/npm-analysis | /sql-queries/licenseViolation.sql | UTF-8 | 384 | 3.421875 | 3 | [
"MIT"
] | permissive | SELECT main
FROM packages
WHERE name = "aws-sdk";
SELECT l.package, l.type, d.package, dl.type
FROM (SELECT package, type FROM license WHERE type LIKE "GPL%") as l
JOIN (SELECT package, name
FROM dependencies) as d JOIN (SELECT package, type FROM license) as dl on d.name = l.package AND d.package = ... | true |
3ba16a0d18ca0b0eaac902dfd02447076b082bdf | SQL | nattawatsakubol/std6102041520050-database | /staff.sql | UTF-8 | 363 | 2.734375 | 3 | [] | no_license | CREATE TABLE `staff` (
`staff_no` varchar(5) NOT NULL,
`first_name` varchar(300) NOT NULL,
`last_name` varchar(300) NOT NULL,
`position` varchar(50) NOT NULL,
`sex` varchar(1) NOT NULL,
`dob` date DEFAULT NULL,
`salary` int(7) NOT NULL,
`branch_no` varchar(5) DEFAULT NULL,
PRIMARY KEY (`staff... | true |
c9f5b89e1154bec0c699c73251810b72aa736118 | SQL | damanic/ls1-module-shop | /updates/d786fef.sql | UTF-8 | 368 | 2.515625 | 3 | [] | no_license | CREATE TABLE `shop_paymentmethods_customer_groups` (
`shop_payment_method_id` int(11) NOT NULL DEFAULT '0',
`customer_group_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`shop_payment_method_id`,`customer_group_id`),
KEY `shop_payment_method_id` (`shop_payment_method_id`),
KEY `customer_group_id` (`customer_... | true |
3e3b6e6cec11d599fe1c2dd599080afa308b3779 | SQL | dalzinho/Codeclan-Work | /w3/Thursday/jedi/joins.sql | UTF-8 | 331 | 2.796875 | 3 | [] | no_license | -- SELECT l.colour FROM lightsabers l;
SELECT j.name, l.colour, l.hilt_metal FROM jedi j
INNER JOIN lightsabers l
ON j.id = l.owner_id;
SELECT j.name, l.colour, l.hilt_metal FROM jedi j
LEFT JOIN lightsabers l
ON j.id = l.owner_id;
SELECT j.name, l.colour, l.hilt_metal FROM jedi j
RIGHT JOIN lightsabers l
ON j.id = ... | true |
f985d3820a7f5646523bbbc58fa8376524a500dc | SQL | MykexMP/redsocial | /redsocial-war/res/datos.sql | UTF-8 | 1,978 | 2.859375 | 3 | [] | no_license | use redsocial;
insert into visibility values (1, 'Public');
insert into visibility values (2, 'Private');
insert into visibility values (3, 'Friends');
insert into visibility values (4, 'Group');
insert into user values(1, 'Ignacio','nachojaime@redsocial.es', '1234', 'nacho', '2010-10-10');
insert into user values(2,... | true |
a81a8a99fbdd35e4321458e8c6f038f242e60c14 | SQL | EgiH/SIAK | /UAS/Sistem Informasi Akademik/siak.sql | UTF-8 | 2,518 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 21, 2017 at 09:13 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
4a8d2549c3ff49b24cf0e9d99ace549720c5eae2 | SQL | HarshDivecha/sql_coding_questions | /opt_queries.sql | UTF-8 | 947 | 4.40625 | 4 | [] | no_license | SELECT a.name "account_name",
a.primary_poc "poc_name",
s.name "sales_rep_name"
FROM accounts a
LEFT JOIN sales_reps s
ON a.sales_rep_id = s.id
AND a.primary_poc < s.name;
-- SELF JOINS
SELECT we1.id AS we_id,
we1.account_id AS we1_account_id,
we1.occurred_at AS we1_occurred_a... | true |
91ce6693e6b7ca2b9421eb3ce785bfe42314674c | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day19/select0107.sql | UTF-8 | 191 | 2.796875 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-18T01:07:00Z' AND timestamp<'2017-11-19T01:07:00Z' AND SENSOR_ID='2bea4741_bb38_43aa_a73d_152523e93790'
| true |
564a686e320bdff3353ded875f7ab5119e7d5709 | SQL | tuanhuytruong/dtgk-dwh | /purchased.sql | UTF-8 | 1,892 | 3.546875 | 4 | [] | no_license | #Purchased
CREATE OR REPLACE EXTERNAL TABLE staging.purchased
(
branch STRING
, inbound_id STRING
, created_at STRING
, col4 STRING
, col5 STRING
, col6 STRING
, supplier_id STRING
, supplier_name STRING
, phone_number STRING
, address STRING
, filler STRING
, creator STRING
, col13 STRING
, col14 STRING
, col15 STRING... | true |
e6d9fa247d8fab303b25209cdb009937c3215cee | SQL | ImamRifaah/UAS---Imam-Rifa-ah | /akademik.sql | UTF-8 | 1,627 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 25, 2021 at 06:03 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
79fc0992903eb2f691e1a9d2b815aa0b17f14c65 | SQL | JihyeHwang09/spring-boot-demo-api | /src/main/resources/data.sql | UTF-8 | 770 | 2.625 | 3 | [] | no_license | INSERT INTO T_BOARD
(
TITLE,
CONTENTS,
CREATOR_ID,
CREATED_DATETIME)
VALUES
(
'인사',
'안녕하세요. 인사드립니다.',
'adimin',
NOW()
);
INSERT INTO T_BOARD
(
TITLE,
CONTENTS,
CREATOR_ID,
CREATED_DATETIME)
VALUES
(
'환영합니다.',
'환영해요. 반갑습니다!',
'user1',
NOW()
);
INSERT I... | true |
61abb3fc291a237565fbd8e6613da31127a311d4 | SQL | OvidiuEDSgrup/TET | /OBIECTE/130227/SQLQuery2.sql | UTF-8 | 120 | 2.6875 | 3 | [] | no_license | select * from rulaje r
where r.Data<='2012-01-01' and r.Cont like '4428%'
order by r.data,r.Rulaj_credit, r.Rulaj_debit | true |
e0ffb6bfc22d19b11fe0ad323d8fc9996300ecd6 | SQL | csdev19/smiledu-trabajo | /scripts.sql | UTF-8 | 2,058 | 2.75 | 3 | [] | no_license | INSERT INTO public.clientes(
nombres, apellidos, fecha_nacimiento, correo, direccion)
VALUES ('cristian', 'sotomayor gonzales', to_date('1998-12-19', 'YYYY-MM-DD'), 'cristiansotomayor1913@gmail.com', 'Las Lilas mzn B lote 5'),
VALUES ('luis', 'sotomayor rivera', to_date('1950-04-24', 'YYYY-MM-DD'), 'cristiansotomayo... | true |
11f8f5daf47b4fabaf6df1454e99e7b9673070f7 | SQL | matt-winkler/demo-subdirectories | /dbt/tests/models/staging/tpch/stg_tpch_customers.sql | UTF-8 | 412 | 2.953125 | 3 | [] | no_license | with source as (
select * from {{ source('tpch', 'customer') }}
),
renamed as (
select
c_custkey as customer_key,
c_name as name,
c_address as address,
c_nationkey as nation_key,
c_phone as phone_number,
c_acctbal as account_balance,
c_mktsegment... | true |
990cd9595c458592f98272274bc6dc9fba6a2558 | SQL | jeremyke/PHPBlog | /Mysql/MySQL基础+高级篇-尚硅谷学习笔记/随堂资料/code/day4/子查询经典案例.sql | UTF-8 | 4,248 | 4.34375 | 4 | [
"MIT"
] | permissive | # 1. 查询工资最低的员工信息: last_name, salary
#①查询最低的工资
SELECT MIN(salary)
FROM employees
#②查询last_name,salary,要求salary=①
SELECT last_name,salary
FROM employees
WHERE salary=(
SELECT MIN(salary)
FROM employees
);
# 2. 查询平均工资最低的部门信息
#方式一:
#①各部门的平均工资
SELECT AVG(salary),department_id
FROM employees
GROUP BY department_id
#②查询... | true |
7545d4f840ee9ac614bf57059b83b822a4a6a4ab | SQL | txteam/tsc | /dbscript/mysql/01basisScript/operator/tables/OPER_OPERATOR.sql | UTF-8 | 689 | 2.84375 | 3 | [] | no_license | DROP TABLE OPER_OPERATOR;
CREATE TABLE OPER_OPERATOR(
id varchar(64) not null,
valid smallint DEFAULT 1 NOT NULL,
pwdErrCount smallint,
historyPwd varchar(255),
organizationId varchar(64),
password varchar(255),
invalidDate datetime,
lastUpdateDate datetime not null default now(),
pwdUpdateDate datet... | true |
66a9d518cf79c2cb9bb724410b030ca74bb510a1 | SQL | stacycjohnson/database-exercises | /3.6_functions_exercises.sql | UTF-8 | 2,930 | 4 | 4 | [] | no_license | -- Exercise Goals
-- 1. Copy the order by exercise and save it as 3.6_functions_exercises.sql.
USE employees;
-- 2. Update your queries for employees whose names start and end with 'E'.
-- Use concat() to combine their first and last name together as a single column named full_name.
SELECT first_name, last_name, CONCA... | true |
dc3002fbb3b20e32ffd026657f707bd9f516d015 | SQL | jabautista/GeniisysSCA | /src/main/resources/sql/procedures/deferred_extract2_prior_dtl.prc | UTF-8 | 54,272 | 3.1875 | 3 | [] | no_license | DROP PROCEDURE CPI.DEFERRED_EXTRACT2_PRIOR_DTL;
CREATE OR REPLACE PROCEDURE CPI.Deferred_Extract2_Prior_Dtl(p_ext_year NUMBER,
p_ext_mm NUMBER,
p_year NUMBER,
... | true |
9b5a10d31a0ca7b7b64c54b0945e6e7a23994ce2 | SQL | KulR/technotrack_bd | /3_lect/3_lect.sql | UTF-8 | 412 | 3.390625 | 3 | [] | no_license | USE track_lect2;
select * from users inner join (
select user_id
from payments
group by user_id
order by sum(payment_sum) desc
limit 3)
using(user_id);
-- user_id login reg_dttm
-- 82 login_82 2018-09-28 15:17:46
-- 38 login_38 2018-09-23 20:27:39
-- 85 login_85 2018-08-27 02:36:25
select (select count(*) from ... | true |
464b3f8526734503b98735ad04fe2c14dc5e06a3 | SQL | tilemapjp/OpenTileMap | /sql/sqlite.sql | UTF-8 | 3,559 | 3.390625 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS sessions (
id CHAR(72) PRIMARY KEY,
session_data TEXT
);;
CREATE TABLE IF NOT EXISTS users (
user_id INTEGER PRIMARY KEY AUTOINCREMENT,
site varchar(20) NOT NULL,
site_id varchar(100) NOT NULL,
user_name varchar(100) NOT NULL
);;
CREATE INDEX IF NOT E... | true |
8a78d3d92dacbb90688da962dbf0d44def3169e0 | SQL | zavh/cdrconverter | /webcdr.sql | UTF-8 | 3,306 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 04, 2019 at 10:31 PM
-- Server version: 5.7.25-0ubuntu0.16.04.2
-- PHP Version: 7.1.27-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!... | true |
b0e1866366b11b5be37e7de04e1b0146b2334ce5 | SQL | laudarch/shopmobapp | /shopmoba_sma.sql | UTF-8 | 6,517 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 11, 2020 at 06:11 PM
-- Server version: 10.3.23-MariaDB-cll-lve
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... | true |
d1b0e58605ee6bf119836b1db3dd2110c8136a6c | SQL | jhassan/shoes | /db/party_name.sql | UTF-8 | 1,301 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 08, 2016 at 06:20 PM
-- Server version: 5.6.12-log
-- PHP Version: 5.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
e27bfce99edf89f63f96c275748cd2618c91374c | SQL | hermitAT/devtips-midterm | /db/schema/01_schema.sql | UTF-8 | 1,740 | 3.796875 | 4 | [] | no_license | DROP TYPE IF EXISTS type CASCADE;
CREATE TYPE type as enum('link', 'image', 'video', 'markdown', 'code');
DROP TABLE IF EXISTS users CASCADE;
DROP TABLE IF EXISTS tags CASCADE;
DROP TABLE IF EXISTS resources CASCADE;
DROP TABLE IF EXISTS resources_tags CASCADE;
DROP TABLE IF EXISTS comments CASCADE;
DROP TABLE IF EXIS... | true |
87fae319b05bf5ea7706ac1b4dbdfc904728753e | SQL | Yabdil/Postgis | /Inner_polygon_query.sql | UTF-8 | 698 | 3.640625 | 4 | [] | no_license | -- We had multiple iner polygons inside our polygons, the goal was to find a query removing the iner polygon
SELECT ST_GeomFromText(polygone) as geom
from (
SELECT st_astext(ST_MakePolygon(linear)) as polygone
from (
SELECT st_astext
((ST_dump
(st_boun... | true |
985891ab3a141f662cb5cb0f9d176a1fc2b19489 | SQL | f2h2h1/unprofitable_00 | /teaching/db.sql | UTF-8 | 5,993 | 2.796875 | 3 | [] | no_license | /*
SQLyog Community Edition- MySQL GUI v6.54
MySQL - 5.5.25a : Database - teaching
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL... | true |
45bcb77315c142e82759cb2f9cd2f138b4061725 | SQL | vanevskidarko/Homeworks | /Homework57/courses_hiking.sql | UTF-8 | 671 | 4.375 | 4 | [] | no_license | CREATE TABLE clients(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
client_name VARCHAR(100),
project_id INT;
CREATE TABLE projects(
id INT NOT NULL PRIMARY KEY,
client_id INT NOT NULL,
project_lead_id INT NOT NULL
);
CREATE TABLE employees (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(50),
last_nam... | true |
2e6858550c8831c2116e3315238662a7597b91da | SQL | elrey99/Mintic22-Java | /Reto4/reto4.sql | UTF-8 | 1,612 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 24-08-2021 a las 19:36:03
-- Versión del servidor: 10.4.16-MariaDB
-- Versión de PHP: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
60b0af99205367ca9f54fe199c3388951ed3cb4f | SQL | MrChozo/misc-code-snippets | /SQL/handy-postgresql.sql | UTF-8 | 3,439 | 4 | 4 | [] | no_license | /* Handy PostgreSQL statements */
-- Add a column
ALTER TABLE forms ADD COLUMN is_deleted boolean;
-- Remove a column
ALTER TABLE forms DROP COLUMN fileobject_id;
-- Set data in a column
UPDATE forms SET is_deleted = FALSE;
UPDATE users
SET is_admin = TRUE
,status = 10
WHERE id = 1;
-- Set data in a column by a... | true |
c866eee2985e27e0c8ecdc6ee5f250bd18309638 | SQL | alexey-zayats/pass-migrations | /migrations/20200415121123_constraints.down.sql | UTF-8 | 3,914 | 2.703125 | 3 | [] | no_license |
-- транспортные пропуска
-- passes
ALTER TABLE passes DROP FOREIGN KEY fk_passes_created;
ALTER TABLE passes DROP KEY idx_passes_district;
ALTER TABLE passes DROP KEY idx_passes_lastname;
ALTER TABLE passes DROP KEY idx_passes_created;
ALTER TABLE passes DROP KEY idx_passes_bid;
ALTER TABLE passes MODIFY COLUMN id IN... | true |
85aefbca4bfcf9ecbf4b5b1a062027232cf32410 | SQL | bao-bao/CSE-560 | /create.sql | UTF-8 | 5,551 | 3.5 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS order_track_user(
otu_id INT UNSIGNED UNIQUE AUTO_INCREMENT NOT NULL,
otu_user_name VARCHAR(32) NOT NULL UNIQUE,
otu_password VARCHAR(32) NOT NULL,
otu_name VARCHAR(128) NOT NULL,
otu_role SMALLINT NOT NULL,
otu_is_active BOOLEAN NOT NULL,
otu_change_time TIMESTAMP... | true |
dbde2d193839c342fffa5ec923e06bc88fe94bc1 | SQL | saturnkr/tezis_Directory | /modules/core/build/db/30-thesis/update/postgres/04/04-460-updateStartDateTimeFactTask.sql | UTF-8 | 380 | 3.09375 | 3 | [] | no_license | --$Id: 04-460-updateStartDateTimeFact.sql 4121 2012-04-04 14:06:08Z subbotin $
update tm_task t set start_datetime_fact = (select max(create_ts) from wf_assignment a where a.name = 'Started' and a.card_id = t.card_id)
where t.card_id in (select tin.card_id from tm_task tin inner join wf_card c on c.id = tin.card_id wh... | true |
bd51580654c8194203ef92ba52c8084fb9ceb9fa | SQL | JhonnyHGoulart/curso-postgreSQL-alura | /scripts-curso/aluno3.sql | UTF-8 | 832 | 3.453125 | 3 | [] | no_license |
create table aluno(
id serial,
nome varchar(255),
cpf char(11),
obs text,
idade integer,
salario numeric,
altura real,
ativo boolean,
data_nascimento date,
hora_aula time,
data_matricula timestamp
);
select * from aluno;
insert into aluno(
nome,
cpf,
obs,
idade,
salario,
altura,
ativo,
dat... | true |
af8c5a383f102b4e969f4ed2e48785997cfb3442 | SQL | envolute/base | /_joomla/_applications/agecefpb/transactionsInvoices/transactionsInvoices.sql | UTF-8 | 4,583 | 4.09375 | 4 | [] | no_license | --
-- Estrutura da tabela `cms_agecefpb_transactions_invoices`
--
CREATE TABLE IF NOT EXISTS `cms_agecefpb_transactions_invoices` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`due_date` date NOT NULL,
`description` varchar(30) NOT NULL,
`custom_desc` varchar(30) NOT NULL,
`note` varchar(255) NOT NULL,
`state` t... | true |
ad47a049a737c113eae4cca3902bc044b51aa834 | SQL | Vinnys2/projeto_final | /jurassic_park_ajax .sql | UTF-8 | 5,039 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.9
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tempo de Geração: 18/11/2019 às 17h51min
-- Versão do Servidor: 5.5.20
-- Versão do PHP: 5.3.9
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... | true |
49c2c56f05aedfea88af8f604568a4b002beaff3 | SQL | a335252661/myssm | /src/main/resources/mysql/maventest.sql | UTF-8 | 8,226 | 3.265625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50717
Source Host : localhost:3306
Source Database : maventest
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2019-03-07 16:10:06
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 15